vsavchenko added inline comments.
================ 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(); ---------------- NoQ wrote: > 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. It will be tricky not to say more. We will need to store the call after we finish analyzing the block. The tricky part is that technically it might not have any "calls", but simply escapes. If one day we track aliases of our parameters (and the capturing block is an alias), then such blocks might be called multiple times on different paths and we'll need to report the call site of the block for sure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98688/new/ https://reviews.llvm.org/D98688 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits