Reviewers: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71976
if (!match(*Node->getBody()))
return false;
- return false;
+ return true;
}
bool shouldVisitTemplateInstantiations() const { return true; }
void func14() {
[] <typename TemplateType> (TemplateType t, TemplateType u) { int e = t + u; };
+ float i = 42.0;
}
)cpp";
lambdaExpr(
forFunction(functionDecl(hasName("func14"))),
has(templateTypeParmDecl(hasName("TemplateType")))))));
+
+ EXPECT_TRUE(
+ matches(Code, traverse(ast_type_traits::TK_IgnoreUnlessSpelledInSource,
+ functionDecl(hasName("func14"),
+ hasDescendant(floatLiteral())))));
}
TEST(IgnoringImpCasts, MatchesImpCasts) {