This revision was automatically updated to reflect the committed changes.
arphaman marked an inline comment as done.
Closed by commit rL318552: [ObjC][ARC] Honor noescape attribute for
-Warc-retain-cycles (authored by arphaman).
Changed prior to commit:
https://reviews.llvm.org/D40141?vs=123211
rjmccall added inline comments.
Comment at: lib/Sema/SemaChecking.cpp:11661
if (Expr *capturer = findCapturingExpr(*this, msg->getArg(i), owner))
return diagnoseRetainCycle(*this, capturer, owner);
+ }
Failing to find a capturing expression will over
arphaman created this revision.
This patch ensures that -Warc-retain-cycles doesn't warn about captures in
blocks that are passed into parameters that have a `noescape` attribute.
Repository:
rL LLVM
https://reviews.llvm.org/D40141
Files:
lib/Sema/SemaChecking.cpp
test/SemaObjC/warn-ret