[PATCH] D98688: [-Wcalled-once-parameter] Harden analysis in terms of block use

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 17 20:08:27 PDT 2021


NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

Great, thanks!!



================
Comment at: clang/test/SemaObjC/warn-called-once.m:861
   // We consider captures by blocks as escapes
-  [self indirect_call:(^{
+  [self indirect_call:(^{ // expected-note{{previous call is here}}
           callback();
----------------
What would it take to move this note to the `callback();` line? It would be great to do so because blocks are often huge and `^` is often hard to notice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98688/new/

https://reviews.llvm.org/D98688



More information about the cfe-commits mailing list