-
Notifications
You must be signed in to change notification settings - Fork 15k
Closed
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
AST_MATCHER_P(LambdaCapture, capturesVar, internal::Matcher<ValueDecl>, |
AST_MATCHER_P(LambdaCapture, capturesVar, internal::Matcher<ValueDecl>,
InnerMatcher) {
auto *capturedVar = Node.getCapturedVar();
return capturedVar && InnerMatcher.matches(*capturedVar, Finder, Builder);
}
ValueDecl *getCapturedVar() const {
assert(capturesVariable() && "No variable available for capture");
return static_cast<ValueDecl *>(DeclAndBits.getPointer());
}
The matcher relies on getCapturedVar returns nullptr if not captured, but the implementation asserts capturesVariable()
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"