Lines Matching defs:matcher
2480 auto matcher = expr(ignoringElidableConstructorCall(declRefExpr()));
2486 matcher, langCxx11OrLater()));
2491 matcher, langCxx11OrLater()));
2513 auto matcher =
2520 matcher, langCxx11OrLater()));
2526 matcher, langCxx11OrLater()));
3765 // Some existing matcher code expects to take a matcher as a
3835 // nodes. In the matcher below, the first use of hasDescendant(Matcher)
3836 // fails, and the use of it inside the traverse() matcher should pass
3837 // causing the overall matcher to be a true match.
3839 // would cause the overall matcher to be incorrectly false.
4777 // present and its inner matcher alone does not match.
4790 // matcher does not match.
4818 // still match the inner matcher.
4826 // casts are present and its inner matcher alone does not match.
4857 // matcher does not match.
4875 // parentheses and/or implicit casts are present and its inner matcher alone
4900 // the inner matcher does not match.
5084 auto matcher = lambdaExpr(forEachLambdaCapture(
5088 matcher, std::make_unique<VerifyIdIsBoundTo<LambdaCapture>>("LC", 2)));
5092 matcher, std::make_unique<VerifyIdIsBoundTo<LambdaCapture>>("LC", 2)));
5096 auto matcher =
5103 matcher, langCxx11OrLater()));
5106 matcher, langCxx11OrLater()));
5115 matcher, std::make_unique<VerifyIdIsBoundTo<LambdaCapture>>("LC", 1)));
5119 auto matcher =
5123 matcher, std::make_unique<VerifyIdIsBoundTo<LambdaCapture>>("LC", 2)));
5126 matcher, std::make_unique<VerifyIdIsBoundTo<LambdaCapture>>("LC", 2)));
5130 auto matcher = lambdaExpr(
5134 matcher, std::make_unique<VerifyIdIsBoundTo<LambdaCapture>>("LC", 1)));
5137 matcher, std::make_unique<VerifyIdIsBoundTo<LambdaCapture>>("LC", 1)));
5268 auto matcher =
5275 Code, matcher,
5278 Code, matcher,
5281 Code, matcher,
5297 auto matcher = templateSpecializationType(
5303 Code, matcher,
5307 Code, matcher,
5310 Code, matcher, std::make_unique<VerifyIdIsBoundTo<Expr>>("E", 2)));
5333 // Those matchers cover all the cases where an inner matcher is called
5335 // matcher and the match of the inner matcher.
5345 // - matches a simple node, and binds it as the first thing in the matcher:
5347 // - uses the matcher under test afterwards in a way that not the first
5350 // the direct parent matches the inner matcher.
6326 auto matcher = varDecl(
6329 EXPECT_TRUE(matches("int* const x = 0;", matcher));
6330 EXPECT_TRUE(notMatches("int const x = 0;", matcher));
6401 auto matcher = varDecl(hasName("x"),
6403 EXPECT_TRUE(matches("int* x;", matcher));
6404 EXPECT_TRUE(matches("float* x;", matcher));
6405 EXPECT_TRUE(matches("char* x;", matcher));
6406 EXPECT_TRUE(matches("void* x;", matcher));
6410 auto matcher = varDecl(hasName("x"),
6412 EXPECT_TRUE(notMatches("int x;", matcher));
6413 EXPECT_TRUE(notMatches("float x;", matcher));
6414 EXPECT_TRUE(notMatches("char x;", matcher));
6448 auto matcher = varDecl(
6450 EXPECT_TRUE(matches("int rr = 3; int& r = rr;", matcher));
6451 EXPECT_TRUE(matches("int rr = 3; auto& r = rr;", matcher));
6452 EXPECT_TRUE(matches("int rr = 3; const int& r = rr;", matcher));
6453 EXPECT_TRUE(matches("float rr = 3.0; float& r = rr;", matcher));
6454 EXPECT_TRUE(matches("char rr = 'a'; char& r = rr;", matcher));
6458 auto matcher = varDecl(
6460 EXPECT_TRUE(notMatches("int r;", matcher));
6461 EXPECT_TRUE(notMatches("int r = 3;", matcher));
6462 EXPECT_TRUE(notMatches("const int r = 3;", matcher));
6463 EXPECT_TRUE(notMatches("int* r;", matcher));
6464 EXPECT_TRUE(notMatches("float r;", matcher));
6465 EXPECT_TRUE(notMatches("char r;", matcher));
6469 auto matcher = varDecl(
6471 EXPECT_TRUE(matches("int&& r = 3;", matcher));
6472 EXPECT_TRUE(matches("auto&& r = 3;", matcher));
6473 EXPECT_TRUE(matches("float&& r = 3.0;", matcher));