[PATCH] D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 17 09:53:39 PDT 2019
ahatanak added inline comments.
================
Comment at: lib/Sema/SemaExpr.cpp:2580
+ if (const BlockDecl *BD = CurContext->getInnerMostBlockDecl())
+ if (!getDiagnostics().isIgnored(diag::warn_implicitly_retains_self, Loc))
+ ImplicitlyRetainedSelfLocs.push_back({Loc, BD});
----------------
rjmccall wrote:
> IIRC this check can be expensive enough that it's probably not worth doing if you expect these entries to typically not result in diagnostics.
`DiagStateMap::lookup` is doing a binary search. Is that what makes this check expensive?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60736/new/
https://reviews.llvm.org/D60736
More information about the cfe-commits
mailing list