This is an archive of the discontinued LLVM Phabricator instance.

[ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles
ClosedPublic

Authored by arphaman on Nov 16 2017, 10:44 AM.

Details

Summary

This patch ensures that -Warc-retain-cycles doesn't warn about captures in blocks that are passed into parameters that have a noescape attribute.

Diff Detail

Repository
rL LLVM

Event Timeline

arphaman created this revision.Nov 16 2017, 10:44 AM
rjmccall added inline comments.Nov 16 2017, 4:20 PM
lib/Sema/SemaChecking.cpp
11661 ↗(On Diff #123211)

Failing to find a capturing expression will overwhelmingly be the controlling condition here, so I would advise switching the order of the checks.

Otherwise, this patch looks good.

This revision was automatically updated to reflect the committed changes.
arphaman marked an inline comment as done.