Lines Matching refs:hasName
25 DeclarationMatcher HasEmptyName = recordDecl(hasName(""));
55 EXPECT_FALSE(Finder.addDynamicMatcher(hasName("x"), nullptr));
65 DeclarationMatcher NamedX = namedDecl(hasName("X"));
117 DeclarationMatcher ClassX = recordDecl(recordDecl(hasName("X")));
142 cxxRecordDecl(hasName("Z"), isDerivedFrom("X"));
261 cxxRecordDecl(isDerivedFrom(recordDecl(hasName("Some"))))));
268 cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName("A"))))));
284 varDecl(hasName("z_float"),
288 varDecl(hasName("z_float"),
292 varDecl(hasName("z_char"),
309 varDecl(hasName("z_float"),
313 varDecl(hasName("z_float"),
317 varDecl(hasName("z_char"),
329 cxxRecordDecl(isDerivedFrom(recordDecl(hasName("X")).bind("test")))));
335 cxxRecordDecl(isDerivedFrom(namedDecl(hasName("X"))))));
340 cxxRecordDecl(hasMethod(hasName("func")))));
352 cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl()))));
362 recordDecl(hasDeclContext(namespaceDecl(hasName("M"))))));
369 recordDecl(hasDeclContext(namespaceDecl(hasName("N"))))));
377 hasName("M"), hasDeclContext(namespaceDecl()))))));
388 Code, varDecl(hasName("MyVar1"), hasDeclContext(translationUnitDecl()))));
390 Code, varDecl(hasName("MyVar2"), hasDeclContext(translationUnitDecl()))));
393 varDecl(hasName("MyVar2"),
403 DeclarationMatcher ClassX = classTemplateDecl(hasName("X"));
409 DeclarationMatcher ClassX = classTemplateDecl(hasName("X"));
417 classTemplateDecl(hasName("X"),
418 hasDescendant(fieldDecl(hasName("a"))))));
424 classTemplateDecl(hasName("X"),
425 hasDescendant(fieldDecl(hasName("a"))))));
434 callExpr(allOf(callee(functionDecl(hasName("f"))),
437 callExpr(allOf(callee(functionDecl(hasName("f"))),
440 recordDecl(hasName("T")))))))));
442 callExpr(allOf(callee(functionDecl(hasName("f"))),
445 recordDecl(hasName("T"))))),
448 callExpr(allOf(callee(functionDecl(hasName("f"))),
451 recordDecl(hasName("T"))))),
468 anyOf(hasName("Y"), allOf(isDerivedFrom("X"), hasName("Z"))));
476 recordDecl(anyOf(hasName("X"), hasName("Y"), hasName("Z"), hasName("U")));
481 recordDecl(anyOf(hasName("X"), hasName("Y"), hasName("Z"), hasName("U"),
482 hasName("V")));
501 DeclarationMatcher HasClassX = recordDecl(has(recordDecl(hasName("X"))));
506 recordDecl(hasName("Y"), has(recordDecl(hasName("X"))));
517 has(recordDecl(hasName("X"))),
518 has(recordDecl(hasName("Y"))),
519 hasName("Z"))),
521 has(recordDecl(hasName("A"))),
522 has(recordDecl(hasName("B"))),
523 hasName("C"))),
524 hasName("F"));
578 hasName("X"))),
580 hasName("Y"))),
581 hasName("Z")))),
584 hasName("C"),
586 hasName("A"))),
588 hasName("B")))))),
589 hasName("F")));
606 unless(hasName("X")));
617 hasName("X"),
618 has(recordDecl(hasName("Z"))),
620 has(recordDecl(hasName("Y")))));
626 namedDecl(hasName("Foo"), unless(recordDecl()));
634 hasDescendant(recordDecl(hasName("X"))),
635 hasName("Z"));
649 hasDescendant(recordDecl(has(recordDecl(hasName("Y"))),
650 hasName("X"))),
651 hasName("Z"));
672 hasDescendant(recordDecl(hasDescendant(recordDecl(hasName("Y"))),
673 hasName("X"))),
674 hasName("Z"));
698 auto Name = hasName("i");
840 varDecl(hasName("i"), has(isInteger()))));
842 varDecl(hasName("i"), has(isInteger()))));
852 varDecl(hasName("i"), hasType(qualType(has(builtinType()))))));
855 varDecl(hasName("i"), hasType(qualType(has(pointerType()))))));
866 EXPECT_TRUE(notMatches("class X {};", enumDecl(hasName("X"))));
870 EXPECT_TRUE(matches("enum X {};", enumDecl(hasName("X"))));
874 DeclarationMatcher Matcher = enumConstantDecl(hasName("A"));
882 expr(hasType(pointsTo(recordDecl(hasName("X")))),
883 has(declRefExpr(to(varDecl(hasName("i"))))));
893 expr(hasType(pointsTo(recordDecl(hasName("X")))),
894 hasDescendant(declRefExpr(to(varDecl(hasName("i"))))));
905 TypeMatcher TypeA = hasDeclaration(recordDecl(hasName("A")));
918 recordDecl(hasName("A"), has(recordDecl(hasName("B")))));
924 varDecl(hasType(namedDecl(hasName("S"))))));
930 parmVarDecl(hasType(namedDecl(hasName("I"))))));
937 parmVarDecl(hasType(pointsTo(objcInterfaceDecl(hasName("Foo")))))));
943 parmVarDecl(hasType(namedDecl(hasName("T"))))));
957 parmVarDecl(hasType(namedDecl(hasName("S"))))));
970 EXPECT_TRUE(matches(Using, unresolvedUsingTypenameDecl(hasName("Foo"))));
972 EXPECT_TRUE(matches(Using, parmVarDecl(hasType(namedDecl(hasName("Foo"))))));
976 DeclarationMatcher ClassX = has(recordDecl(hasName("::X")).bind("x"));
985 recordDecl(hasName("A"), has(recordDecl(hasName("B")).bind("b"))));
992 callExpr(callee(cxxMethodDecl(hasName("x")))).bind("x");
1019 DeclarationMatcher ClassX = recordDecl(hasName("X")).bind("x");
1023 recordDecl(hasName("A"), hasDescendant(ClassX)),
1024 recordDecl(hasName("B"), hasDescendant(ClassX)))),
1031 qualType(hasDeclaration(enumDecl(hasName("X")))))))));
1042 varDecl(hasName("a"),
1051 hasDeclaration(namedDecl(hasName("A"))))))));
1055 TypeMatcher ClassX = hasDeclaration(recordDecl(hasName("X")));
1067 TypeMatcher ClassX = hasDeclaration(recordDecl(hasName("X")));
1078 DeclarationMatcher ClassX = recordDecl(hasName("X"));
1087 DeclarationMatcher ClassX = recordDecl(hasName("X"));
1096 varDecl(hasName("x"), hasTypeLoc(loc(asString("int"))))));
1107 callExpr(hasDeclaration(cxxMethodDecl(hasName("x"))));
1113 cxxMemberCallExpr(on(hasType(recordDecl(hasName("Y")))));
1132 cxxMemberCallExpr(on(hasType(pointsTo(recordDecl(hasName("Y"))))));
1177 nonTypeTemplateParmDecl(hasName("N"))));
1184 templateTypeParmDecl(hasName("T"))));
1292 cxxMemberCallExpr(thisPointerType(recordDecl(hasName("Y"))));
1324 cxxMemberCallExpr(thisPointerType(recordDecl(hasName("Y"))))))));
1347 auto M = varDecl(hasName("X"), hasLocalStorage());
1352 M = varDecl(hasName("X"), hasGlobalStorage());
1362 EXPECT_TRUE(matches(T, varDecl(hasName("x"), hasAutomaticStorageDuration())));
1364 notMatches(T, varDecl(hasName("y"), hasAutomaticStorageDuration())));
1366 notMatches(T, varDecl(hasName("a"), hasAutomaticStorageDuration())));
1368 EXPECT_TRUE(matches(T, varDecl(hasName("y"), hasStaticStorageDuration())));
1369 EXPECT_TRUE(matches(T, varDecl(hasName("a"), hasStaticStorageDuration())));
1370 EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasStaticStorageDuration())));
1376 EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasThreadStorageDuration())));
1377 EXPECT_TRUE(notMatches(T, varDecl(hasName("y"), hasThreadStorageDuration())));
1378 EXPECT_TRUE(notMatches(T, varDecl(hasName("a"), hasThreadStorageDuration())));
1384 varDecl(hasName("i"))));
1389 cxxMemberCallExpr(on(declRefExpr(to(varDecl(hasName("y"))))));
1426 sizeOfExpr(hasArgumentOfType(hasDeclaration(recordDecl(hasName("A")))))));
1428 hasArgumentOfType(hasDeclaration(recordDecl(hasName("string")))))));
1508 StatementMatcher CallMethodX = callExpr(callee(cxxMethodDecl(hasName("x"))));
1535 StatementMatcher CallFunctionF = callExpr(callee(functionDecl(hasName("f"))));
1571 functionTemplateDecl(hasName("f"))));
1577 functionTemplateDecl(hasName("f"))));
1584 functionTemplateDecl(hasName("f"),
1586 functionDecl(hasName("g"))))))));
1591 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
1599 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
1605 hasAnyArgument(declRefExpr(to(varDecl(hasName("y"))))));
1629 hasType(references(recordDecl(hasName("X")))));
1671 cxxMethodDecl(hasParameter(0, hasName("x")))));
1682 cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X")))))));
1685 cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X")))))));
1688 0, hasType(pointsTo(recordDecl(hasName("X"))))))));
1691 0, hasType(references(recordDecl(hasName("X"))))))));
1697 cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))));
1700 cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))));
1710 recordDecl(hasName("Y")))))));
1722 notMatches("void Func();", functionDecl(hasName("Func"), isDeleted())));
1724 functionDecl(hasName("Func"), isDeleted())));
1738 varDecl(hasName("foo"), isConstexpr())));
1740 functionDecl(hasName("bar"), isConstexpr())));
1746 cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))));
1752 hasType(pointsTo(recordDecl(hasName("X"))))))));
1755 TEST(HasName, MatchesParameterVariableDeclarations) {
1757 cxxMethodDecl(hasAnyParameter(hasName("x")))));
1759 cxxMethodDecl(hasAnyParameter(hasName("x")))));
1796 refersToDeclaration(fieldDecl(hasName("next")))))));
1809 hasDescendant(declRefExpr(to(fieldDecl(hasName("next"))))))))));
1923 cxxMethodDecl(isVirtual(), hasName("::X::f"))));
1929 cxxMethodDecl(isPure(), hasName("::X::f"))));
1958 cxxMethodDecl(isOverride(), hasName("::Y::f"))));
1961 cxxMethodDecl(isOverride(), hasName("::X::f"))));
1969 cxxMethodDecl(isOverride(), hasName("::Y::f"))));
1988 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
2004 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
2114 cxxConstructorDecl(ofClass(hasName("Foo")))));
2116 cxxConstructorDecl(ofClass(hasName("Bar")))));
2131 cxxMethodDecl(isImplicit(), hasName("operator="))));
2166 cxxDestructorDecl(ofClass(hasName("Foo")))));
2171 cxxDestructorDecl(ofClass(hasName("Foo")))));
2195 forField(hasType(recordDecl(hasName("Baz"))))))));
2197 forField(hasName("foo_"))))));
2199 forField(hasType(recordDecl(hasName("Bar"))))))));
2223 allOf(forField(hasName("foo_")), isWritten())))));
2225 allOf(forField(hasName("bar_")), isWritten())))));
2227 allOf(forField(hasName("bar_")), unless(isWritten()))))));
2242 hasName("E")))));
2245 hasName("D")))));
2248 hasName("D")))));
2251 hasName("E")))));
2267 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
2280 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
2627 recordDecl(hasName("a::b::C"))));
2629 recordDecl(hasName("::a::b::C"))));
2631 recordDecl(hasName("b::C"))));
2633 recordDecl(hasName("C"))));
2635 recordDecl(hasName("c::b::C"))));
2637 recordDecl(hasName("a::c::C"))));
2639 recordDecl(hasName("a::b::A"))));
2641 recordDecl(hasName("::C"))));
2643 recordDecl(hasName("::b::C"))));
2645 recordDecl(hasName("z::a::b::C"))));
2647 recordDecl(hasName("a+b::C"))));
2649 recordDecl(hasName("C"))));
2655 recordDecl(hasName("A::B::C"))));
2658 recordDecl(hasName("::A::B::C"))));
2661 recordDecl(hasName("B::C"))));
2664 recordDecl(hasName("C"))));
2667 recordDecl(hasName("c::B::C"))));
2670 recordDecl(hasName("A::c::C"))));
2673 recordDecl(hasName("A::B::A"))));
2676 recordDecl(hasName("::C"))));
2679 recordDecl(hasName("::B::C"))));
2681 recordDecl(hasName("z::A::B::C"))));
2684 recordDecl(hasName("A+B::C"))));
2689 recordDecl(hasName("A"), isDefinition());
2694 varDecl(hasName("a"), isDefinition());
2699 cxxMethodDecl(hasName("a"), isDefinition());
2706 ofClass(hasName("X")))));
2723 callExpr(callee(cxxMethodDecl(hasName("x"))))));
2734 recordDecl(hasName("C"), hasDescendant(callExpr(
2735 callee(cxxMethodDecl(hasName("x"))))))));
2771 DeclarationMatcher HasClassB = just(has(recordDecl(hasName("B")).bind("b")));
2794 polymorphicHas(recordDecl(hasName("B")).bind("b"));
2806 polymorphicHas(recordDecl(hasName("B")));
2831 cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName("a"))))))));
2932 memberExpr(member(hasName("first")))));
2939 memberExpr(member(hasName("first")))));
2947 memberExpr(member(hasName("first")))));
2961 "struct A { int i; };", fieldDecl(isPublic(), hasName("i"))));
2963 "struct A { int i; };", fieldDecl(isProtected(), hasName("i"))));
2965 "struct A { int i; };", fieldDecl(isPrivate(), hasName("i"))));
2968 "class A { int i; };", fieldDecl(isPublic(), hasName("i"))));
2970 "class A { int i; };", fieldDecl(isProtected(), hasName("i"))));
2972 "class A { int i; };", fieldDecl(isPrivate(), hasName("i"))));
2975 "class A { protected: int i; };", fieldDecl(isPublic(), hasName("i"))));
2977 fieldDecl(isProtected(), hasName("i"))));
2979 "class A { protected: int i; };", fieldDecl(isPrivate(), hasName("i"))));
2982 EXPECT_TRUE(notMatches("int i;", varDecl(isPublic(), hasName("i"))));
2983 EXPECT_TRUE(notMatches("int i;", varDecl(isProtected(), hasName("i"))));
2984 EXPECT_TRUE(notMatches("int i;", varDecl(isPrivate(), hasName("i"))));
2992 cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98"));
2995 cxxMethodDecl(ofClass(hasName("X")))));
3001 cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98"));
3007 memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X")))))));
3013 memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X")))))));
3017 hasType(pointsTo(recordDecl(hasName("X"))))))));
3025 hasType(pointsTo(recordDecl(hasName("S"))))))));
3029 hasType(pointsTo(recordDecl(hasName("S"))))))));
3033 EXPECT_TRUE(notMatches("class X { void m(); };", fieldDecl(hasName("m"))));
3034 EXPECT_TRUE(notMatches("class X { class m {}; };", fieldDecl(hasName("m"))));
3035 EXPECT_TRUE(notMatches("class X { enum { m }; };", fieldDecl(hasName("m"))));
3036 EXPECT_TRUE(notMatches("class X { enum m {}; };", fieldDecl(hasName("m"))));
3040 EXPECT_TRUE(matches("class X { int m; };", fieldDecl(hasName("m"))));
3232 declRefExpr(to(varDecl(hasName("x")))))))));
3271 declRefExpr(to(varDecl(hasName("x")))))))));
3330 declRefExpr(to(varDecl(hasName("x")))))))));
3342 declRefExpr(to(varDecl(hasName("x")))))))));
3411 initListExpr(hasType(recordDecl(hasName("B"))))));
3415 declRefExpr(to(functionDecl(hasName("f"))))));
3427 usingDecl(hasAnyUsingShadowDecl(hasName("a")))));
3583 recordDecl(hasName("C"), forEach(fieldDecl(hasName("x")).bind("x"))),
3589 recordDecl(hasName("C"), forEach(fieldDecl().bind("f"))),
3596 recordDecl(hasName("C"),
3603 recordDecl(hasName("C"),
3604 forEachDescendant(fieldDecl(hasName("x")).bind("x"))),
3610 isDefinition(), decl().bind("x"), hasName("C"));
3613 recordDecl(hasName("A"), anyOf(m, forEachDescendant(m))),
3621 recordDecl(hasName("A"), allOf(hasDescendant(m), anyOf(m, anything()))),
3629 recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind("f"))),
3637 recordDecl(hasName("C"), forEachDescendant(recordDecl(
3671 hasName("X")))
3680 recordDecl().bind("x"), hasName("::X"),
3681 anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything())),
3684 "class X {};", recordDecl(recordDecl().bind("x"), hasName("::X"),
3695 cxxRecordDecl(decl().bind("x"), hasMethod(hasName("g"))),
3701 hasAnyConstructorInitializer(forField(hasName("b")))))),
3709 functionDecl(decl().bind("x"), hasAnyParameter(hasName("y"))),
3733 functionDecl(decl().bind("x"), hasAncestor(recordDecl(hasName("::A")))),
3740 ifStmt(stmt().bind("x"), hasAncestor(recordDecl(hasName("::A")))),
3744 recordDecl(hasName("::A"), decl().bind("x"), unless(hasName("fooble"))),
3748 cxxConstructorDecl(hasName("::A::A"), decl().bind("x"),
3749 forEachConstructorInitializer(forField(hasName("i")))),
3756 recordDecl(hasName("C"), forEachDescendant(decl().bind("decl"))),
3760 recordDecl(hasName("C"), forEachDescendant(decl().bind("decl"))),
3767 recordDecl(hasName("::A"), findAll(recordDecl(hasName("::A")).bind("v"))),
3774 recordDecl(hasName("::A"), findAll(fieldDecl().bind("v"))),
3781 recordDecl(hasName("::A"),
3782 findAll(decl(anyOf(recordDecl(hasName("::A")).bind("v"),
3788 recordDecl(hasName("::A"), findAll(recordDecl(isDefinition()).bind("v"))),
3795 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
3796 has(fieldDecl(hasName("b")).bind("v")))),
3803 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
3804 has(fieldDecl(hasName("b")).bind("v")))),
3808 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
3809 has(fieldDecl(hasName("b")).bind("v")))),
3813 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
3814 has(fieldDecl(hasName("b")).bind("v"))))));
3823 cxxRecordDecl(hasName("::X"), isTemplateInstantiation())));
3828 fieldDecl(hasType(recordDecl(hasName("A"))))))));
3834 functionDecl(hasParameter(0, hasType(recordDecl(hasName("A")))),
3843 fieldDecl(hasType(recordDecl(hasName("A"))))))));
3851 cxxRecordDecl(hasName("::X"), isTemplateInstantiation())));
3862 cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation())));
3875 cxxRecordDecl(hasName("::X<A>::Y"), unless(isTemplateInstantiation()))));
3882 cxxRecordDecl(hasName("::X"), isTemplateInstantiation())));
3994 recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("A"))))));
4000 recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("X"))))));
4006 varDecl(hasName("c"), hasType(recordDecl(hasName("C"),
4007 hasAncestor(recordDecl(hasName("A"))))))));
4019 integerLiteral(equals(42), hasAncestor(functionDecl(hasName("f"))))));
4049 varDecl(hasName("x"),
4060 hasAncestor(recordDecl(hasName("A"))))));
4068 hasAncestor(recordDecl(hasName("A")))))))));
4238 varDecl(hasName("b")))))))));
4308 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4310 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ptr"),
4312 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4314 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4316 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4318 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4322 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4324 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4326 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ptr"),
4328 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4332 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4334 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4336 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4338 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),
4340 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),
4342 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4346 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4348 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4350 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4352 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),
4354 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4356 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),
4366 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("a"),
4368 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("b"),
4370 EXPECT_TRUE(matches(Fragment, varDecl(hasName("c"),
4372 EXPECT_TRUE(matches(Fragment, varDecl(hasName("c"),
4374 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("c"),
4376 EXPECT_TRUE(matches(Fragment, varDecl(hasName("d"),
4378 EXPECT_TRUE(matches(Fragment, varDecl(hasName("d"),
4380 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("d"),
4382 EXPECT_TRUE(matches(Fragment, varDecl(hasName("e"),
4384 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("e"),
4386 EXPECT_TRUE(matches(Fragment, varDecl(hasName("e"),
4420 EXPECT_TRUE(matches("typedef int X; X a;", varDecl(hasName("a"),
4432 recordType(hasDeclaration(recordDecl(hasName("S"))))));
4434 recordType(hasDeclaration(recordDecl(hasName("S"))))));
4457 elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))));
4463 elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))));
4479 hasDeclaration(namedDecl(hasName("D")))))))));
4530 namespaceAliasDecl(hasName("alias"))));
4535 specifiesType(hasDeclaration(recordDecl(hasName("A")))));
4544 specifiesNamespace(hasName("ns")));
4582 specifiesNamespace(hasName("a")))))));
4587 specifiesNamespace(hasName("a")))))));
4592 specifiesNamespace(hasName("a")))))));
4613 functionDecl(hasName("f"),
4627 specifiesNamespace(hasName("a"))))))));
4632 specifiesNamespace(hasName("a"))))))));
4637 specifiesNamespace(hasName("a"))))))));
4656 functionDecl(hasName("f"),
4684 "class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),
4686 "X", decl(hasDescendant(recordDecl(hasName("X::Y")).bind("Y"))),
4689 "class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),
4691 "X", decl(hasDescendant(recordDecl(hasName("X::Z")).bind("Z"))),
4708 "class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),
4710 "X", recordDecl(has(recordDecl(hasName("X::Y")).bind("Y"))), "Y")));
4712 "class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),
4714 "X", recordDecl(has(recordDecl(hasName("X::Z")).bind("Z"))), "Z")));
4759 "class X { class Y {}; };", recordDecl(hasName("::X::Y")).bind(""),
4766 fieldDecl(hasName("y"), hasType(type().bind(""))).bind("decl"),
4854 "int i = 1;", varDecl(namedDecl(hasName("i")).bind("name"),
4873 decl(allOf(recordDecl(hasName("::X::Y")).bind("record"),
4877 decl(allOf(recordDecl(hasName("::X")).bind("record"),
4885 has(fieldDecl(hasName("a"), hasType(type().bind("t")))),
4886 has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))));
4891 has(fieldDecl(hasName("a"), hasType(type().bind("t")))),
4892 has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))));
4924 hasName("f"), forEachDescendant(varDecl().bind("d")),
4936 callee(cxxMethodDecl(hasName("data"))),
4938 varDecl(hasType(recordDecl(hasName("StringRef")))).bind("var")))),
4940 callee(cxxMethodDecl(anyOf(hasName("size"), hasName("length")))),
4952 callee(cxxMethodDecl(hasName("data"))),
4954 varDecl(hasType(recordDecl(hasName("StringRef")))).bind("var")))),
4956 callee(cxxMethodDecl(anyOf(hasName("size"), hasName("length")))),
4963 typedefDecl(hasName("typedefDeclTest"))));
4968 functionDecl(isInline(), hasName("f"))));
4970 namespaceDecl(isInline(), hasName("m"))));
4978 recordDecl(hasName("X"), isExpansionInMainFile())));
5009 recordDecl(isExpansionInFileMatching("b.*"), hasName("B")), true,
5015 recordDecl(isExpansionInFileMatching("f.*"), hasName("X")), false,