File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
clang/unittests/Analysis/FlowSensitive Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -240,12 +240,15 @@ checkDataflow(AnalysisInputs<AnalysisT> AI,
240
240
};
241
241
}
242
242
243
- for (const ast_matchers::BoundNodes &BN :
244
- ast_matchers::match (ast_matchers::functionDecl (
245
- ast_matchers::hasBody (ast_matchers::stmt ()),
246
- AI.TargetFuncMatcher )
247
- .bind (" target" ),
248
- Context)) {
243
+ SmallVector<ast_matchers::BoundNodes, 1 > MatchResult = ast_matchers::match (
244
+ ast_matchers::functionDecl (ast_matchers::hasBody (ast_matchers::stmt ()),
245
+ AI.TargetFuncMatcher )
246
+ .bind (" target" ),
247
+ Context);
248
+ if (MatchResult.empty ())
249
+ return llvm::createStringError (llvm::inconvertibleErrorCode (),
250
+ " didn't find any matching target functions" );
251
+ for (const ast_matchers::BoundNodes &BN : MatchResult) {
249
252
// Get the AST node of the target function.
250
253
const FunctionDecl *Target = BN.getNodeAs <FunctionDecl>(" target" );
251
254
if (Target == nullptr )
You can’t perform that action at this time.
0 commit comments