swiftlang/swift

[SR-1807] Sema should catch and warn about self capture in closures

開放

#44,416 建立於 2016年6月17日

 (6 則留言) (0 個反應) (0 位負責人)Swift (10,719 個分叉)batch import
compilergood first issuenew feature

倉庫指標

星標
 (69,989 顆星)
PR 合併指標
 (平均合併 8天 17小時) (30 天內合併 510 個 PR)

描述

Previous ID SR-1807
Radar rdar://26865978
Original Reporter @CodaFi
Type New Feature
Votes 0
Component/s Compiler
Labels New Feature, StarterBug
Assignee None
Priority Medium

md5: 3ea294e377274fa3d27e3c3b76ff7bbd

Issue Description:

To maintain parity with Objective-C, we should use our ARC analysis pass in Sema to check for the presence of self capture in blocks without weak or @noescape. This should be a very simple warning modeled after the one in /clang/lib/Sema/SemaChecking.cpp void diagnoseRetainCycle().

貢獻者指南