================
@@ -8243,8 +8259,7 @@ class Sema final : public SemaBase {
/// List of SourceLocations where 'self' is implicitly retained inside a
/// block.
- llvm::SmallVector<std::pair<SourceLocation, const BlockDecl *>, 1>
- ImplicitlyRetainedSelfLocs;
+ llvm::SmallVector<BlockCapture, 1> DiagnosableBlockCaptures;
----------------
rjmccall wrote:
Hmm. I am concerned about this being global on `Sema` rather than tied to
something like a specific function scope info. We might end up diagnosing the
same thing in multiple places when we have nested functions after the block
capture, e.g. because of lambdas or local classes — anything that causes us to
end a function body while the outer function body is still being processed.
Maybe we just never saw this with the narrow case of implicit `self` captures
that this was used with before.
https://github.com/llvm/llvm-project/pull/144388
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits