reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/unittests/ASTMatchers/ASTMatchersInternalTest.cpp
   25     EXPECT_TRUE(notMatches("class X {};", HasEmptyName));
   32       EXPECT_TRUE(notMatches("class X {};", HasEmptyName));
  189   EXPECT_TRUE(notMatches("", recordDecl(isExpansionInMainFile())));
  206   EXPECT_TRUE(notMatches("class X {};",
  208   EXPECT_TRUE(notMatches("", recordDecl(isExpansionInSystemHeader())));
tools/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
   58   EXPECT_TRUE(notMatches("class X {};", YHasClassX));
   60     notMatches("class Y { class Z { class X {}; }; };", YHasClassX));
  157   EXPECT_TRUE(notMatches("", NotClassX));
  158   EXPECT_TRUE(notMatches("class Y {};", NotClassX));
  160   EXPECT_TRUE(notMatches("class Y {}; class X : public Y {};", NotClassX));
  162     notMatches("class Y {}; class Z {}; class X : public Y {};",
  172   EXPECT_TRUE(notMatches("class X { class Y {}; class Z {}; };",
  178   EXPECT_TRUE(notMatches("struct Foo {};", NamedNotRecord));
  184   EXPECT_TRUE(notMatches("char *p = 0;",
  204   EXPECT_TRUE(notMatches("class Z {};", ZDescendantClassX));
  216   EXPECT_TRUE(notMatches(
  261   EXPECT_TRUE(notMatches("void f() { int i; }",
  263   EXPECT_TRUE(notMatches("void f() { int i; }",
  278   EXPECT_TRUE(notMatches("template <typename T> struct S;"
  297     notMatches("class X {}; class W : public X {};", YOrZDerivedFromX));
  298   EXPECT_TRUE(notMatches("class Z {};", YOrZDerivedFromX));
  303   EXPECT_TRUE(notMatches("class V {};", XOrYOrZOrU));
  313   EXPECT_TRUE(notMatches("class A {};", XOrYOrZOrUOrV));
  318   EXPECT_TRUE(notMatches("int F() { return 1; }", MixedTypes));
  329   EXPECT_TRUE(notMatches("class X {};", IsDerivedFromX));
  330   EXPECT_TRUE(notMatches("class X;", IsDerivedFromX));
  331   EXPECT_TRUE(notMatches("class Y;", IsDerivedFromX));
  332   EXPECT_TRUE(notMatches("", IsDerivedFromX));
  339   EXPECT_TRUE(notMatches("class X {};", IsDirectlyDerivedFromX));
  340   EXPECT_TRUE(notMatches("class X;", IsDirectlyDerivedFromX));
  341   EXPECT_TRUE(notMatches("class Y;", IsDirectlyDerivedFromX));
  342   EXPECT_TRUE(notMatches("", IsDirectlyDerivedFromX));
  349   EXPECT_TRUE(notMatches("class Y;", IsAX));
  350   EXPECT_TRUE(notMatches("", IsAX));
  360       notMatches("class X {}; class Y : public X {}; class Z : public Y {};",
  366   EXPECT_TRUE(notMatches("class X {};"
  381     notMatches("template<class X> class A { class Z : public X {}; };",
  391     notMatches("template<template<class T> class X> class A { "
  399     notMatches("template<class X> class A { class Z : public X::D {}; };",
  415     notMatches("template<class T> class X {}; "
  424     notMatches("template<class X> class A { class Z : public X::D::E {}; };",
  433   EXPECT_TRUE(notMatches("class X {}; class Y : public X {}; "
  441     notMatches("template<class X> class D { typedef X A; typedef A B; "
  460     notMatches("class Base {}; class Base2 {}; typedef Base2 X; "
  466     notMatches("template <typename T> class Z;"
  482     notMatches("template<int> struct X;"
  492   EXPECT_TRUE(notMatches(
  517   EXPECT_TRUE(notMatches(
  542   EXPECT_TRUE(notMatches(
  554   EXPECT_TRUE(notMatches(
  571   EXPECT_TRUE(notMatches(Code, cxxRecordDecl(isDerivedFrom(""))));
  572   EXPECT_TRUE(notMatches(Code, cxxRecordDecl(isDirectlyDerivedFrom(""))));
  573   EXPECT_TRUE(notMatches(Code, cxxRecordDecl(isSameOrDerivedFrom(""))));
  684   EXPECT_TRUE(notMatches("struct S { void operator()() const; };", IsLambda));
  761   EXPECT_TRUE(notMatches("class Y { }; "
  773   EXPECT_TRUE(notMatches("class Y { void myOperator(); };",
  802   EXPECT_TRUE(notMatches("int X;", M));
  803   EXPECT_TRUE(notMatches("void f() { static int X; }", M));
  806   EXPECT_TRUE(notMatches("void f() { int X; }", M));
  814   EXPECT_TRUE(notMatches("static int X;", M));
  815   EXPECT_TRUE(notMatches("void f() { int X; }", M));
  816   EXPECT_TRUE(notMatches("int X;", M));
  825     notMatches(T, varDecl(hasName("y"), hasAutomaticStorageDuration())));
  827     notMatches(T, varDecl(hasName("a"), hasAutomaticStorageDuration())));
  833   EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasStaticStorageDuration())));
  839   EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasThreadStorageDuration())));
  840   EXPECT_TRUE(notMatches(T, varDecl(hasName("y"), hasThreadStorageDuration())));
  841   EXPECT_TRUE(notMatches(T, varDecl(hasName("a"), hasThreadStorageDuration())));
  853   EXPECT_TRUE(notMatches("void x() { int a = sizeof(a); }", sizeOfExpr(
  858   EXPECT_TRUE(notMatches("void x() { int a = sizeof(a); }", sizeOfExpr(
  871   EXPECT_TRUE(notMatches("int *i;", varDecl(hasType(isInteger()))));
  872   EXPECT_TRUE(notMatches("struct T {}; T t; void f(T *) { }; void g() {f(&t);}",
  879   EXPECT_TRUE(notMatches("unsigned i = 0;",
  884   EXPECT_TRUE(notMatches("int i = 0;", varDecl(hasType(isUnsignedInteger()))));
  899   EXPECT_TRUE(notMatches("int i = 0;", varDecl(hasType(isAnyPointer()))));
  907   EXPECT_TRUE(notMatches("int i;", varDecl(hasType(isAnyCharacter()))));
  915   EXPECT_TRUE(notMatches("class Y { void x() { (*this).y; } int y; };",
  920       notMatches("template <class T> class Y { void x() { (*this).m; } };",
  927   EXPECT_TRUE(notMatches("class Y { void x() { y; } static int y; };",
  929   EXPECT_TRUE(notMatches("class Y { void x() { (*this).y; } static int y; };",
  938   EXPECT_TRUE(notMatches("class Y { void x() { Y y; y.x(); } };",
  946       notMatches("class Y { template <class T> void x() { (*this).x<T>(); } };",
  953   EXPECT_TRUE(notMatches("struct S { operator int(); };",
  971   EXPECT_TRUE(notMatches("void x(int, int) { x(0, 0); }", Call1Arg));
  978   EXPECT_TRUE(notMatches("void f() {}", Function1Arg));
  979   EXPECT_TRUE(notMatches("void f(int i, int j, int k) {}", Function1Arg));
  995     notMatches("class X {}; extern X x;", ReferenceClassX));
  997     notMatches("class X {}; void y(X *y) { X *&x = y; }", ReferenceClassX));
 1001   EXPECT_TRUE(notMatches("typedef const int const_int; const_int i = 1;",
 1007   EXPECT_TRUE(notMatches("int m;",
 1015   EXPECT_TRUE(notMatches("void f() {}", functionDecl(isExternC())));
 1021   EXPECT_TRUE(notMatches("int i;", varDecl(isExternC())));
 1028   EXPECT_TRUE(notMatches("int i = 1;", varDecl(isStaticStorageClass())));
 1029   EXPECT_TRUE(notMatches("extern int i;", varDecl(isStaticStorageClass())));
 1030   EXPECT_TRUE(notMatches("void f() {}", functionDecl(isStaticStorageClass())));
 1034   EXPECT_TRUE(notMatches("class A { ~A(); };",
 1042     notMatches("void Func();", functionDecl(hasName("Func"), isDeleted())));
 1048   EXPECT_TRUE(notMatches("void f();", functionDecl(isNoThrow())));
 1049   EXPECT_TRUE(notMatches("void f() throw(int);", functionDecl(isNoThrow())));
 1051     notMatches("void f() noexcept(false);", functionDecl(isNoThrow())));
 1055   EXPECT_TRUE(notMatches("void f();", functionProtoType(isNoThrow())));
 1056   EXPECT_TRUE(notMatches("void f() throw(int);", functionProtoType(isNoThrow())));
 1058     notMatches("void f() noexcept(false);", functionProtoType(isNoThrow())));
 1070   EXPECT_TRUE(notMatches("void baz() { if (1 > 0) {} }", ifStmt(isConstexpr()),
 1079     notMatches("template<typename T> struct C {}; C<int> c;",
 1085     notMatches("template<typename T> struct C {}; C<int> c;",
 1093   EXPECT_TRUE(notMatches("template<typename T> struct C {}; C<int> c;",
 1108   EXPECT_TRUE(notMatches("template<int T> struct C {}; C<42> c;",
 1118       notMatches("class C { public: int i; };", accessSpecDecl(isProtected())));
 1120       notMatches("class C { public: int i; };", accessSpecDecl(isPrivate())));
 1122   EXPECT_TRUE(notMatches("class C { int i; };", accessSpecDecl()));
 1129   EXPECT_TRUE(notMatches("class X {};", cxxRecordDecl(isFinal())));
 1131     notMatches("class X { virtual void f(); };", cxxMethodDecl(isFinal())));
 1137   EXPECT_TRUE(notMatches("class X { int f(); };", cxxMethodDecl(isVirtual())));
 1145     notMatches("class A { virtual int f(); };"
 1153   EXPECT_TRUE(notMatches("class X { int f(); };", cxxMethodDecl(isPure())));
 1167   EXPECT_TRUE(notMatches("class X { X &operator=(X &&); };",
 1172   EXPECT_TRUE(notMatches("class X { X &operator=(X); };",
 1182   EXPECT_TRUE(notMatches("class X { X &operator=(X &); };",
 1190     notMatches("struct A { void foo(); };", cxxMethodDecl(isConst())));
 1197   EXPECT_TRUE(notMatches("class X { virtual int f(); }; "
 1200   EXPECT_TRUE(notMatches("class X { int f(); }; "
 1203   EXPECT_TRUE(notMatches("class X { int f(); int f(int); }; ",
 1224     notMatches("class X { public: X(int); }; void x() { int z; X x(z); }",
 1230     notMatches("class X { public: X(int); }; void x() { int y; X x(y); }",
 1247     notMatches("class X { public: X(int, int); }; void x() { X x(0, 0); }",
 1266   EXPECT_TRUE(notMatches("class Foo { };",
 1281   EXPECT_TRUE(notMatches("struct S { S(int); };",
 1321   EXPECT_TRUE(notMatches(
 1324   EXPECT_TRUE(notMatches(
 1328   EXPECT_TRUE(notMatches(
 1334   EXPECT_TRUE(notMatches(
 1338   EXPECT_TRUE(notMatches(
 1341   EXPECT_TRUE(notMatches(
 1350   EXPECT_TRUE(notMatches("struct S { int X = 0; };",
 1352   EXPECT_TRUE(notMatches("struct S { S() = default; };",
 1354   EXPECT_TRUE(notMatches("struct S { S() = delete; };",
 1363   EXPECT_TRUE(notMatches("struct S { S(); S(int); int X; };",
 1365   EXPECT_TRUE(notMatches("struct S { S(){} S(int X) : X(X) {} int X; };",
 1383   EXPECT_TRUE(notMatches("const char *s = \"ab\";", Literal));
 1395   EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",
 1397   EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",
 1399   EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",
 1401   EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",
 1403   EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",
 1405   EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",
 1407   EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",
 1409   EXPECT_TRUE(notMatches("namespace a { namespace b { class AC; } }",
 1427     notMatches("class A { class B { class C; }; };",
 1430     notMatches("class A { class B { class C; }; };",
 1433     notMatches("class A { class B { class C; }; };",
 1436     notMatches("class A { class B { class C; }; };",
 1439     notMatches("class A { class B { class C; }; };",
 1441   EXPECT_TRUE(notMatches("class A { class B { class C; }; };",
 1444     notMatches("class A { class B { class C; }; };",
 1502   EXPECT_TRUE(notMatches(Code, recordDecl(hasAnyName("::C", "::b::C"))));
 1514   EXPECT_TRUE(notMatches("class A;", DefinitionOfClassA));
 1519   EXPECT_TRUE(notMatches("extern int a;", DefinitionOfVariableA));
 1524   EXPECT_TRUE(notMatches("class A { void a(); };", DefinitionOfMethodA));
 1578   EXPECT_TRUE(notMatches("void f() {}",
 1585   EXPECT_TRUE(notMatches("void f() { 1; }",
 1587   EXPECT_TRUE(notMatches("void f() { 1; }",
 1601   EXPECT_TRUE(notMatches("void f() { { 1; } { 1; 2; 3; 4; } }",
 1615   EXPECT_TRUE(notMatches("struct { int i; } first; int i(first.i);",
 1631   EXPECT_TRUE(notMatches(
 1639   EXPECT_TRUE(notMatches("class C { int a : 2; int b; };",
 1651       notMatches("class C { int a = 2; int b; };",
 1658   EXPECT_TRUE(notMatches(
 1660   EXPECT_TRUE(notMatches(
 1663   EXPECT_TRUE(notMatches(
 1665   EXPECT_TRUE(notMatches(
 1670   EXPECT_TRUE(notMatches(
 1674   EXPECT_TRUE(notMatches(
 1678   EXPECT_TRUE(notMatches("int i;", varDecl(isPublic(), hasName("i"))));
 1679   EXPECT_TRUE(notMatches("int i;", varDecl(isProtected(), hasName("i"))));
 1680   EXPECT_TRUE(notMatches("int i;", varDecl(isPrivate(), hasName("i"))));
 1684   EXPECT_TRUE(notMatches("void f();", functionDecl(hasDynamicExceptionSpec())));
 1685   EXPECT_TRUE(notMatches("void g() noexcept;",
 1687   EXPECT_TRUE(notMatches("void h() noexcept(true);",
 1689   EXPECT_TRUE(notMatches("void i() noexcept(false);",
 1698   EXPECT_TRUE(notMatches("void f();", functionProtoType(hasDynamicExceptionSpec())));
 1699   EXPECT_TRUE(notMatches("void g() noexcept;",
 1701   EXPECT_TRUE(notMatches("void h() noexcept(true);",
 1703   EXPECT_TRUE(notMatches("void i() noexcept(false);",
 1714   EXPECT_TRUE(notMatches(
 1762   EXPECT_TRUE(notMatches("class X { void m(); };", fieldDecl(hasName("m"))));
 1763   EXPECT_TRUE(notMatches("class X { class m {}; };", fieldDecl(hasName("m"))));
 1764   EXPECT_TRUE(notMatches("class X { enum { m }; };", fieldDecl(hasName("m"))));
 1765   EXPECT_TRUE(notMatches("class X { enum m {}; };", fieldDecl(hasName("m"))));
 1775   EXPECT_TRUE(notMatches("volatile int *i;",
 1799   EXPECT_TRUE(notMatches("typedef int nonconst_int; nonconst_int i = 42;",
 1801   EXPECT_TRUE(notMatches("int const* p;",
 1808   EXPECT_TRUE(notMatches("void f() {int i,j; int k;}",
 1810   EXPECT_TRUE(notMatches("void f() {int i,j, k, l;}",
 1834   EXPECT_TRUE(notMatches(
 1910   EXPECT_TRUE(notMatches(
 1917   EXPECT_TRUE(notMatches(
 1929   EXPECT_TRUE(notMatches("template<typename T> class A { T i; };",
 1940   EXPECT_TRUE(notMatches("template<typename T> struct A { void x() { T i; } };",
 1951   EXPECT_TRUE(notMatches("template<typename T> void A(T t) { T i; }",
 1962   EXPECT_TRUE(notMatches("template<typename T> void A(T t) { T i; }",
 1970   EXPECT_TRUE(notMatches(
 2000   EXPECT_TRUE(notMatches("template<int T> int f() { return T; }",
 2022   EXPECT_TRUE(notMatches(
 2025   EXPECT_TRUE(notMatches(
 2032   EXPECT_TRUE(notMatches(
 2036   EXPECT_TRUE(notMatches(
 2044   EXPECT_TRUE(notMatches(
 2047   EXPECT_TRUE(notMatches(
 2065   EXPECT_TRUE(notMatches("void func();", functionDecl(isNoReturn())));
 2066   EXPECT_TRUE(notMatches("void func() {}", functionDecl(isNoReturn())));
 2072       notMatches("struct S { void func(); };", functionDecl(isNoReturn())));
 2074       notMatches("struct S { void func() {} };", functionDecl(isNoReturn())));
 2076   EXPECT_TRUE(notMatches("struct S { static void func(); };",
 2078   EXPECT_TRUE(notMatches("struct S { static void func() {} };",
 2081   EXPECT_TRUE(notMatches("struct S { S(); };", functionDecl(isNoReturn())));
 2082   EXPECT_TRUE(notMatches("struct S { S() {} };", functionDecl(isNoReturn())));
 2145   EXPECT_TRUE(notMatches("struct S { void func(); };",
 2157   EXPECT_TRUE(notMatches("struct S { int func(); };",
 2168   EXPECT_TRUE(notMatches("struct A {}; A a[7];",
 2181   EXPECT_TRUE(notMatches(
 2184   EXPECT_TRUE(notMatches(
 2187   EXPECT_TRUE(notMatches(
 2199   EXPECT_TRUE(notMatches("int i[7];", decayedType()));
 2207   EXPECT_TRUE(notMatches(
 2213   EXPECT_TRUE(notMatches("namespace N {}", namespaceDecl(isAnonymous())));
 2218   EXPECT_TRUE(notMatches("class vector {};"
 2239   EXPECT_TRUE(notMatches("namespace std {"
 2273   EXPECT_TRUE(notMatches("int i = 1.f;",
 2280   EXPECT_TRUE(notMatches(
 2292   EXPECT_TRUE(notMatches(
 2303   EXPECT_TRUE(notMatches("class X { class Y {}; };",
 2315   EXPECT_TRUE(notMatches(
 2401       notMatches("static int a = 0;", namedDecl(hasExternalFormalLinkage())));
 2402   EXPECT_TRUE(notMatches("static void f(void) { int a = 0; }",
 2417   EXPECT_TRUE(notMatches("void x(int val) {}",
 2434   EXPECT_TRUE(notMatches("struct x;",
 2441   EXPECT_TRUE(notMatches("class x;",
 2448   EXPECT_TRUE(notMatches("union x;",
 2454   EXPECT_TRUE(notMatches("enum X {};", enumDecl(isScoped())));
 2461   EXPECT_TRUE(notMatches("int X() { return 0; }", 
 2463   EXPECT_TRUE(notMatches("int X();", functionDecl(hasTrailingReturn())));
 2471   EXPECT_TRUE(notMatches(
 2488       notMatches("void x() { int a; if(a == 0) return; }", BinAsgmtOperator));
 2508     notMatches("int main2() {}", functionDecl(isMain())));
tools/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
   34   EXPECT_TRUE(notMatches("", decl(usingDecl())));
   49   EXPECT_TRUE(notMatches("#define X 1", NamedX));
   62   EXPECT_TRUE(notMatches("#define Xkl 1", NamedX));
   71   EXPECT_TRUE(notMatches("int cab;", Abc));
   79   EXPECT_TRUE(notMatches("class C { int ckc; };", StartsWithK));
   94   EXPECT_TRUE(notMatches("", ClassX));
  114   EXPECT_TRUE(notMatches("void foo() {};", linkageSpecDecl()));
  119   EXPECT_TRUE(notMatches("class X;", ClassX));
  120   EXPECT_TRUE(notMatches("class X {};", ClassX));
  130   EXPECT_TRUE(notMatches("template<typename T> class X { };"
  137   EXPECT_TRUE(notMatches("template<typename T, typename U> class X { };"
  173   EXPECT_TRUE(notMatches("class X {};", enumDecl(hasName("X"))));
  183   EXPECT_TRUE(notMatches("enum X{ B };", Matcher));
  184   EXPECT_TRUE(notMatches("enum X {};", Matcher));
  222   EXPECT_TRUE(notMatches(MkStr("NS::X x; NS::f(x);"), ADLMatch));
  223   EXPECT_TRUE(notMatches(MkStr("MyX x; f(x);"), ADLMatch));
  224   EXPECT_TRUE(notMatches(MkStr("NS::X x; using NS::f; f(x);"), ADLMatch));
  229   EXPECT_TRUE(notMatches(MkStr("MyX x; x + x;"), ADLMatch));
  230   EXPECT_TRUE(notMatches(MkStr("MyX x; x + x;"), ADLMatchOper));
  232   EXPECT_TRUE(notMatches(MkStr("NS::X x; NS::operator+(x, x);"), ADLMatch));
  242   EXPECT_TRUE(notMatches("class Y { void x() {} };", MethodX));
  254     notMatches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }",
  257     notMatches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }",
  260     notMatches("class Y { public: void x(); }; void z() { Y *y; y->x(); }",
  276     notMatches("class Y { public: void x(); }; void z() { Y y; y.x(); }",
  279     notMatches("class Y { public: void x(); }; void z(Y &y) { y.x(); }",
  291   EXPECT_TRUE(notMatches("void f() { for (int i; i<5; ++i); }",
  310     notMatches("template <typename T> void f();", nonTypeTemplateParmDecl()));
  317     notMatches("template <int N> void f();", templateTypeParmDecl()));
  355   EXPECT_TRUE(notMatches("class Y { }; "
  364   EXPECT_TRUE(notMatches("bool x = true, y = true; bool t = x && y;", OpCall));
  365   EXPECT_TRUE(notMatches("int t = 5 << 2;", OpCall));
  414   EXPECT_TRUE(notMatches(
  438   EXPECT_TRUE(notMatches(
  447   EXPECT_TRUE(notMatches("void x() { int a = sizeof(a); }",
  457   EXPECT_TRUE(notMatches("class Y { void x() {} };", memberExpr()));
  458   EXPECT_TRUE(notMatches("class Y { void x() {} };", unresolvedMemberExpr()));
  460       notMatches("class Y { void x() {} };", cxxDependentScopeMemberExpr()));
  490   EXPECT_TRUE(notMatches("class Y { void x() { y; } static int y; };",
  492   EXPECT_TRUE(notMatches("class Y { void x() { Y::y; } static int y; };",
  500   EXPECT_TRUE(notMatches("void f() { }", CallFunctionF));
  515     notMatches("void f(int); template <typename T> void g(T t) { f(t); }",
  518     notMatches("void f(int);"
  523   EXPECT_TRUE(notMatches("void f(int);", functionDecl(isVariadic())));
  524   EXPECT_TRUE(notMatches("template <typename... Ts> void f(Ts...);",
  526   EXPECT_TRUE(notMatches("void f();", functionDecl(isVariadic())));
  541     notMatches("void f(double d); void f(int t) {}",
  547     notMatches("void g(); template <typename T> void f(T t) {}"
  560   EXPECT_TRUE(notMatches("template<typename T> struct A {};",
  566   EXPECT_TRUE(notMatches("class A {};", declaratorDecl()));
  571   EXPECT_TRUE(notMatches("void f();", parmVarDecl()));
  597     notMatches("struct X { int f () { int a; return a; } };", cxxThisExpr()));
  613     notMatches(ClassString +
  624     notMatches("class no_dtor {};"
  643     notMatches(ClassString +
  660     notMatches(ClassString +
  688   EXPECT_TRUE(notMatches("void x(int, int = 0) { int y; x(y, 0); }", Arg));
  699   EXPECT_TRUE(notMatches("const char s[1] = {'a'};", Literal));
  708   EXPECT_TRUE(notMatches("const wchar_t c = 0x2126;", CharLiteral));
  709   EXPECT_TRUE(notMatches("const char c = 0x1;", CharLiteral));
  720   EXPECT_TRUE(notMatches("int i = L'a';",
  723   EXPECT_TRUE(notMatches("int i = 'a';", HasIntLiteral));
  724   EXPECT_TRUE(notMatches("int i = 1e10;", HasIntLiteral));
  725   EXPECT_TRUE(notMatches("int i = 10.0;", HasIntLiteral));
  746   EXPECT_TRUE(notMatches("float i = 10;", HasFloatLiteral));
  747   EXPECT_TRUE(notMatches("double i = 5.0;", floatLiteral(equals(6.0))));
  748   EXPECT_TRUE(notMatches("double i = 5.0;", floatLiteral(equals(6.0f))));
  750     notMatches("double i = 5.0;", floatLiteral(equals(llvm::APFloat(6.0)))));
  851   EXPECT_TRUE(notMatches("void x() { if (false) {} }", Condition));
  852   EXPECT_TRUE(notMatches("void x() { bool a = true; if (a) {} }", Condition));
  853   EXPECT_TRUE(notMatches("void x() { if (true || false) {} }", Condition));
  854   EXPECT_TRUE(notMatches("void x() { if (1) {} }", Condition));
  863   EXPECT_TRUE(notMatches("void x() { false ? false : true; }", Conditional));
  864   EXPECT_TRUE(notMatches("void x() { true ? true : false; }", Conditional));
  871     notMatches("void x() { true ? false : true; }", ConditionalFalse));
  875     notMatches("void x() { true ? false : true; }", ConditionalFalse));
  899   EXPECT_TRUE(notMatches("int i; void f() { i = 1; }",
  906   EXPECT_TRUE(notMatches("int as[] = { 1, 2, 3 };"
  912   EXPECT_TRUE(notMatches("void f() { ; }", forStmt()));
  913   EXPECT_TRUE(notMatches("void f() { if(true); }", forStmt()));
  917   EXPECT_TRUE(notMatches("void f();", compoundStmt()));
  925   EXPECT_TRUE(notMatches("namespace n { struct S {}; }",
  945   EXPECT_TRUE(notMatches("char c = '0';", castExpr()));
  946   EXPECT_TRUE(notMatches("char c, &q = c;", castExpr()));
  947   EXPECT_TRUE(notMatches("int i = (0);", castExpr()));
  948   EXPECT_TRUE(notMatches("int i = 0;", castExpr()));
  957   EXPECT_TRUE(notMatches("char* p = (char*)(&p);", cxxReinterpretCastExpr()));
  958   EXPECT_TRUE(notMatches("char q, *p = const_cast<char*>(&q);",
  960   EXPECT_TRUE(notMatches("void* p = static_cast<void*>(&p);",
  962   EXPECT_TRUE(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
  977     notMatches(FooClass + "void r() { Foo f = (Foo) \"hello world\"; }",
  980     notMatches(FooClass + "void r() { Foo f = \"hello world\"; }",
  997   EXPECT_TRUE(notMatches("char* p = (char*)(&p);", cxxStaticCastExpr()));
  998   EXPECT_TRUE(notMatches("char q, *p = const_cast<char*>(&q);",
 1000   EXPECT_TRUE(notMatches("void* p = reinterpret_cast<char*>(&p);",
 1002   EXPECT_TRUE(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
 1013   EXPECT_TRUE(notMatches("char* p = static_cast<char*>(0);"
 1039   EXPECT_TRUE(notMatches("int x = 0;",
 1041   EXPECT_TRUE(notMatches("int x = 0, &y = x;",
 1044   EXPECT_TRUE(notMatches("int x = 0; double d = (double) x;",
 1046   EXPECT_TRUE(notMatches("const int *p; int *q = const_cast<int *>(p);",
 1049   EXPECT_TRUE(notMatches("int x = (0);",
 1054   EXPECT_TRUE(notMatches("class X {};", stmt()));
 1062   EXPECT_TRUE(notMatches("void x() {}", declStmt()));
 1109   EXPECT_TRUE(notMatches("int a[] = { 1, 2 };", cxxStdInitializerListExpr()));
 1110   EXPECT_TRUE(notMatches("struct B { int x, y; }; B b = { 5, 6 };",
 1133   EXPECT_TRUE(notMatches("void x() {}", whileStmt()));
 1135   EXPECT_TRUE(notMatches("void x() { do {} while(true); }", whileStmt()));
 1144   EXPECT_TRUE(notMatches("void x() { while(true) {} }", doStmt()));
 1151   EXPECT_TRUE(notMatches("void x() { switch(42) {} }", switchCase()));
 1158   EXPECT_TRUE(notMatches("void x() {}", switchStmt()));
 1165     notMatches("void foo() try { } catch(int X) { }", cxxThrowExpr()));
 1172   EXPECT_TRUE(notMatches("void foo() try { throw; } catch(int) { }",
 1176   EXPECT_TRUE(notMatches("void foo() try { int X; } catch (...) { }",
 1183   EXPECT_TRUE(notMatches("int i = 3;", parenExpr()));
 1184   EXPECT_TRUE(notMatches("int foo() { return 1; }; int a = foo();",
 1202   EXPECT_TRUE(notMatches(
 1208   EXPECT_TRUE(notMatches("int c[41], d[43];", constantArrayType(hasSize(42))));
 1215   EXPECT_TRUE(notMatches(
 1224   EXPECT_TRUE(notMatches("int a[42]; void f() { int b[a[0]]; }",
 1230   EXPECT_TRUE(notMatches("int a[] = {2, 3}; int b[42];", variableArrayType()));
 1247     EXPECT_TRUE(notMatches("_Atomic(float) f;",
 1282       notMatches("void (*fp)(void);", pointerType(pointee(functionType()))));
 1299   EXPECT_TRUE(notMatches("int *array[4];", varDecl(hasType(parenType()))));
 1304   EXPECT_TRUE(notMatches(
 1332   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
 1336   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
 1338   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
 1340   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
 1342   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
 1346   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
 1348   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
 1352   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
 1356   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
 1358   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
 1360   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
 1366   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
 1370   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
 1372   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
 1374   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
 1378   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
 1390   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("a"),
 1392   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("b"),
 1398   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("c"),
 1404   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("d"),
 1408   EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("e"),
 1448   EXPECT_TRUE(notMatches("int i;",
 1461   EXPECT_TRUE(notMatches("class C {}; C c;", elaboratedType()));
 1489   EXPECT_TRUE(notMatches(
 1496   EXPECT_TRUE(notMatches("void f() {int i;}", nullStmt()));
 1510   EXPECT_TRUE(notMatches("namespace A { struct B {}; } A::B b;", Matcher));
 1517   EXPECT_TRUE(notMatches("namespace xx { struct A {}; } xx::A a;", Matcher));
 1518   EXPECT_TRUE(notMatches("struct ns { struct A {}; }; ns::A a;", Matcher));
 1592   EXPECT_TRUE(notMatches("using typedefDeclTest2 = int;",
 1599   EXPECT_TRUE(notMatches("typedef int typeAliasTest;",
 1623       notMatches(Code, typeAliasTemplateDecl(hasName("typeAliasDecl"))));
tools/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
   24   EXPECT_TRUE(notMatches("class A { void func(); };",
   46   EXPECT_TRUE(notMatches(
   76   EXPECT_TRUE(notMatches("void f() { float f = 2.0f; }",
  105   EXPECT_TRUE(notMatches("int** i;",
  117   EXPECT_TRUE(notMatches(
  129   EXPECT_TRUE(notMatches(
  141   EXPECT_TRUE(notMatches(
  150   EXPECT_TRUE(notMatches("class A {};", TypeA));
  157   EXPECT_TRUE(notMatches("class A {};", TypeA));
  191   EXPECT_TRUE(notMatches("template <typename T> struct S {"
  294   EXPECT_TRUE(notMatches(
  305     notMatches("class X {}; void y(X *x) { x; }",
  317     notMatches("class X {}; void y() { X *x; }", varDecl(hasType(ClassX))));
  328     notMatches("class X {}; void y(X *x) { x; }",
  337     notMatches("class X {}; void y() { X *x; }", varDecl(hasType(ClassX))));
  344   EXPECT_TRUE(notMatches("typedef const int T;",
  354   EXPECT_TRUE(notMatches("using T = const int;",
  365   EXPECT_TRUE(notMatches("class X {}; X x;",
  374   EXPECT_TRUE(notMatches("class Y { void x() {} };", CallMethodX));
  379   EXPECT_TRUE(notMatches("struct Y { operator int() const; }; Y y = Y();",
  387     notMatches("class Y { void x() { this->x(); } };", callExpr(callee(callExpr()))));
  397   EXPECT_TRUE(notMatches("void x(int) { int z; x(z); }", CallArgumentY));
  401   EXPECT_TRUE(notMatches("void x(int) { int y; x(y); }", WrongIndex));
  430   EXPECT_TRUE(notMatches("void x(int, int) { x(1, 2); }", CallArgumentY));
  431   EXPECT_TRUE(notMatches("struct Y { Y(int, int); };"
  434   EXPECT_TRUE(notMatches("template <class Y>"
  542   EXPECT_TRUE(notMatches(Snippet2, MatchesY));
  580   EXPECT_TRUE(notMatches(Snippet2, MatchesX));
  591   EXPECT_TRUE(notMatches(Snippet3, MatchesCall));
  610   EXPECT_TRUE(notMatches(Snippet2, MatchesX));
  614   EXPECT_TRUE(notMatches(Snippet1, MatchesXPointer));
  626   EXPECT_TRUE(notMatches("void f(int* i) { int* y; f(y); }", CallExpr));
  628   EXPECT_TRUE(notMatches("void f(int i) { int x; f(x); }", CallExpr));
  719   EXPECT_TRUE(notMatches("typedef int &int_ref;"
  733   EXPECT_TRUE(notMatches("class X { void x(int) {} };",
  742   EXPECT_TRUE(notMatches("class X { void x(int) {} };",
  750   EXPECT_TRUE(notMatches(
  777   EXPECT_TRUE(notMatches("class Y { int f() { return 1; } };",
  785   EXPECT_TRUE(notMatches(
  791   EXPECT_TRUE(notMatches("class Y {}; class X { void x() {} };",
  799   EXPECT_TRUE(notMatches("class Y {}; class X { void x(int) {} };",
  827   EXPECT_TRUE(notMatches(
  840   EXPECT_TRUE(notMatches(
  854   EXPECT_TRUE(notMatches(
  865   EXPECT_TRUE(notMatches(
  875   EXPECT_TRUE(notMatches(
  982   EXPECT_TRUE(notMatches("template<unsigned T> struct C {}; C<42> c;",
  990   EXPECT_TRUE(notMatches("class Foo { Foo(int i); };",
 1000   EXPECT_TRUE(notMatches("class Foo {};",
 1006     notMatches("class Foo { Foo() { } };",
 1032   EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(
 1044   EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(
 1058   EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(
 1077   EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(allOf(
 1083   EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(allOf(
 1091   EXPECT_TRUE(notMatches("void f() { if (false) false; else true; }",
 1095   EXPECT_TRUE(notMatches("void f() { if (false) true; else false; }",
 1103   EXPECT_TRUE(notMatches("void x() { true && false; }", OperatorOr));
 1113   EXPECT_TRUE(notMatches("void x() { false || true; }", OperatorTrueFalse));
 1118   EXPECT_TRUE(notMatches("void x() { \"abc\"[1]; }", OperatorIntPointer));
 1127   EXPECT_TRUE(notMatches("void x() { true || true; }", HasOperand));
 1214     notMatches("struct A { void x(A *a) { a->x(this); } };",
 1219     notMatches("bool b = true;", binaryOperator(hasOperatorName("="))));
 1222   EXPECT_TRUE(notMatches("int a[42]; void x() { a[23]; }", unaryOperator()));
 1225   EXPECT_TRUE(notMatches(
 1235   EXPECT_TRUE(notMatches("void x() { true; } ", OperatorNot));
 1243   EXPECT_TRUE(notMatches("void x() { !true; }", OperatorOnFalse));
 1269   EXPECT_TRUE(notMatches("int i; double d = (double)i;", unaryOperator()));
 1272   EXPECT_TRUE(notMatches("void f(); void x() { f(); }", unaryOperator()));
 1276   EXPECT_TRUE(notMatches(
 1288   EXPECT_TRUE(notMatches(
 1310     notMatches("class Y { public: Y(); }; void x(int) { Y y; }",
 1338   EXPECT_TRUE(notMatches("void x() { if (false) {} }", IfStmt));
 1343   EXPECT_TRUE(notMatches("void x() { for (;false;) {} }", ForStmt));
 1348   EXPECT_TRUE(notMatches("void x() { while (false) {} }", WhileStmt));
 1353   EXPECT_TRUE(notMatches("void x() { switch (43) {case 43:;} }", SwitchStmt));
 1372   EXPECT_TRUE(notMatches("void f(){ for (int i = 0; ; ++i); }",
 1374   EXPECT_TRUE(notMatches("void f() {int i; for (; i < 4; ++i) {} }",
 1381   EXPECT_TRUE(notMatches("void f() { for(;;); }",
 1390   EXPECT_TRUE(notMatches("void f();", functionDecl(hasBody(compoundStmt()))));
 1405   EXPECT_TRUE(notMatches("void f() { if (true) for (;;); }",
 1455   EXPECT_TRUE(notMatches("char c = 0;",
 1459   EXPECT_TRUE(notMatches("int arr[3]; int *p = arr;",
 1507   EXPECT_TRUE(notMatches("struct H {};"
 1595       notMatches("class C {}; C a = C();", varDecl(has(cxxConstructExpr()))));
 1615   EXPECT_TRUE(notMatches("int x; const int y = x;",
 1618   EXPECT_TRUE(notMatches("int x; int y = x;",
 1624   EXPECT_TRUE(notMatches("char* p = static_cast<char*>(0);",
 1627   EXPECT_TRUE(notMatches("int i = (0);",
 1630   EXPECT_TRUE(notMatches("float i = (float)0;",
 1633   EXPECT_TRUE(notMatches("float i = float(0);",
 1680   EXPECT_TRUE(notMatches("int x = ((0));",
 1686   EXPECT_TRUE(notMatches("char x = ((0));",
 1690   EXPECT_TRUE(notMatches("char *x = static_cast<char *>((0));",
 1724   EXPECT_TRUE(notMatches("char c = ((3));",
 1729   EXPECT_TRUE(notMatches("float y = (float(0));",
 1732   EXPECT_TRUE(notMatches("float y = (float)0;",
 1735   EXPECT_TRUE(notMatches("char* p = static_cast<char*>(0);",
 1758   EXPECT_TRUE(notMatches("namespace f { int a; void b(); } using f::a;",
 1767   EXPECT_TRUE(notMatches(
 1776   EXPECT_TRUE(notMatches("void f() {int a;}", SingleDeclStmt));
 1777   EXPECT_TRUE(notMatches("void f() {int a = 4, b = 3;}",
 1790   EXPECT_TRUE(notMatches("void f() {int a = 4, b = 3;}",
 1796   EXPECT_TRUE(notMatches("void x() { switch(42); }",
 1802   EXPECT_TRUE(notMatches(
 1809   EXPECT_TRUE(notMatches("void x() { switch(42) { case 1+1: case 2+2:; } }",
 1813   EXPECT_TRUE(notMatches("void x() { switch(42) { case 1 ... 2:; } }",
 1880   EXPECT_TRUE(notMatches(
 1883   EXPECT_TRUE(notMatches(
 2112   EXPECT_TRUE(notMatches(
 2189   EXPECT_TRUE(notMatches(
 2192   EXPECT_TRUE(notMatches(
 2280     notMatches("template <typename T> struct C { static void f() {} };"
 2317   EXPECT_TRUE(notMatches(
 2331   EXPECT_TRUE(notMatches(
 2337   EXPECT_TRUE(notMatches(
 2353   EXPECT_TRUE(notMatches(
 2385   EXPECT_TRUE(notMatches(
 2430   EXPECT_TRUE(notMatches(
 2547     notMatches(
 2557   EXPECT_TRUE(notMatches(CppString2, returnStmt(forFunction(hasName("F")))));
 2586   EXPECT_TRUE(notMatches(Code1, ForEachOverriddenInClass("A")));
 2601   EXPECT_TRUE(notMatches(Code2, ForEachOverriddenInClass("A1")));
 2617       notMatches(Fragment, unresolvedLookupExpr(hasAnyDeclaration(functionDecl(
 2619   EXPECT_TRUE(notMatches(Fragment, unresolvedLookupExpr(hasAnyDeclaration(
 2630   EXPECT_TRUE(notMatches(Fragment, substTemplateTypeParmType(hasReplacementType(
 2633       notMatches("template<int N>"
 2644   EXPECT_TRUE(notMatches("template<typename T> class A {};", Matcher));
tools/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
  388   EXPECT_TRUE(notMatches("struct Foo {};", D));