[PATCH] D40141: [ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 16 16:20:59 PST 2017


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 overwhelmingly be the controlling condition here, so I would advise switching the order of the checks.

Otherwise, this patch looks good.


Repository:
  rL LLVM

https://reviews.llvm.org/D40141





More information about the cfe-commits mailing list