Lines Matching defs:ToTU

125   auto *ToTU = Imported->getTranslationUnitDecl();
128 DeclCounterWithPredicate<CXXRecordDecl>().match(ToTU, Pattern);
142 auto *ToTU = To->getTranslationUnitDecl();
145 DeclCounterWithPredicate<CXXRecordDecl>().match(ToTU, Pattern);
1322 auto ToTU = ToTemplated->getTranslationUnitDecl();
1324 FirstDeclMatcher<ClassTemplateDecl>().match(ToTU, classTemplateDecl());
1338 auto ToTU = ToTemplated->getTranslationUnitDecl();
1340 ToTU, functionTemplateDecl());
1860 Decl *ToTU = getToTuDecl(
1875 .match(ToTU, classTemplateDecl()));
1895 .match(ToTU, classTemplateDecl()));
1900 Decl *ToTU = getToTuDecl(
1910 ToTU, cxxRecordDecl(unless(isImplicit()))));
1925 ToTU, cxxRecordDecl(unless(isImplicit()))));
1991 Decl *ToTU = getToTuDecl(
2008 .match(ToTU, classTemplateSpecializationDecl()));
2029 .match(ToTU, classTemplateSpecializationDecl()));
2075 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2077 EXPECT_EQ(0u, ToTU->getASTContext().getDiagnostics().getNumWarnings());
2079 DeclCounter<RecordDecl>().match(ToTU, recordDecl(hasName("X"))));
2108 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2110 EXPECT_EQ(1u, ToTU->getASTContext().getDiagnostics().getNumWarnings());
2112 DeclCounter<RecordDecl>().match(ToTU, recordDecl(hasName("X"))));
2145 Decl *ToTU = getToTuDecl("int x = 1;", Lang_CXX03);
2146 ExistingD = FirstDeclMatcher<VarDecl>().match(ToTU, Pattern);
2163 Decl *ToTU = getToTuDecl(
2170 ExistingD = FirstDeclMatcher<VarDecl>().match(ToTU, Pattern);
2218 Decl *ToTU = ImportedD->getTranslationUnitDecl();
2220 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2221 auto *To0 = FirstDeclMatcher<FunctionDecl>().match(ToTU, Pattern);
2222 auto *To1 = LastDeclMatcher<FunctionDecl>().match(ToTU, Pattern);
2236 Decl *ToTU = ImportedD->getTranslationUnitDecl();
2238 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2239 auto *To0 = FirstDeclMatcher<FunctionDecl>().match(ToTU, Pattern);
2240 auto *To1 = LastDeclMatcher<FunctionDecl>().match(ToTU, Pattern);
2286 Decl *ToTU = getToTuDecl(
2295 }).match(ToTU, functionDecl()));
2305 }).match(ToTU, functionDecl()));
2327 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2329 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, BFP), 1u);
2330 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, DFP), 1u);
2365 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2367 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, BFP), 1u);
2368 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, DFP), 1u);
2369 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, BFDefP), 1u);
2370 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, DFDefP), 1u);
2371 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, FDefAllP), 2u);
2397 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2399 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, BFP), 1u);
2400 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, BFDefP), 0u);
2403 ToTU, cxxRecordDecl(hasName("B")));
2404 auto *ToBFInClass = FirstDeclMatcher<CXXMethodDecl>().match(ToTU, BFP);
2406 ToTU, cxxMethodDecl(hasName("f"), isDefinition()));
2413 EXPECT_EQ(ToBFOutOfClass->getLexicalDeclContext(), ToTU);
2457 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2459 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, BFP), 1u);
2460 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, DFP), 1u);
2461 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, BFDefP), 0u);
2462 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, DFDefP), 0u);
2465 ToTU, cxxRecordDecl(hasName("B")));
2467 ToTU, cxxRecordDecl(hasName("D")));
2468 auto *ToBFInClass = FirstDeclMatcher<CXXMethodDecl>().match(ToTU, BFP);
2470 ToTU, cxxMethodDecl(hasName("f"), isDefinition()));
2471 auto *ToDFInClass = FirstDeclMatcher<CXXMethodDecl>().match(ToTU, DFP);
2473 ToTU, cxxMethodDecl(hasName("f"), isDefinition()));
2480 EXPECT_EQ(ToBFOutOfClass->getLexicalDeclContext(), ToTU);
2486 EXPECT_EQ(ToDFOutOfClass->getLexicalDeclContext(), ToTU);
2585 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2586 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, functionDecl(hasName("f"))),
2654 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2656 ToTU, translationUnitDecl(hasDescendant(
2770 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2771 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2773 auto *ToFD = LastDeclMatcher<FunctionDecl>().match(ToTU, Pattern);
2788 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2789 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2791 auto *ToFD = LastDeclMatcher<FunctionDecl>().match(ToTU, Pattern);
2805 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2806 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2808 auto *ToFD = LastDeclMatcher<FunctionDecl>().match(ToTU, Pattern);
2823 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2824 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2826 auto *ToFD = LastDeclMatcher<FunctionDecl>().match(ToTU, Pattern);
2846 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2847 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2850 .match(ToTU, friendDecl())
2875 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2876 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2879 ToTU, functionDecl(unless(hasParent(friendDecl()))));
2905 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2906 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
2933 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2934 auto *Class = FirstDeclMatcher<CXXRecordDecl>().match(ToTU, ClassPattern);
2937 LookupRes = ToTU->noload_lookup(ToName);
2940 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, FunctionPattern), 1u);
2941 auto *To0 = FirstDeclMatcher<FunctionDecl>().match(ToTU, FunctionPattern);
2979 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
2980 auto *ToClass = FirstDeclMatcher<CXXRecordDecl>().match(ToTU, ClassPattern);
2983 LookupRes = ToTU->noload_lookup(ToName);
2987 ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, FunctionPattern), 2u);
2988 ToFriend = FirstDeclMatcher<FunctionDecl>().match(ToTU, FunctionPattern);
2989 auto *ToNormal = LastDeclMatcher<FunctionDecl>().match(ToTU, FunctionPattern);
3022 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
3024 auto *ToClass = FirstDeclMatcher<CXXRecordDecl>().match(ToTU, ClassPattern);
3027 LookupRes = ToTU->noload_lookup(ToName);
3030 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, FunctionPattern), 2u);
3031 ToNormal = FirstDeclMatcher<FunctionDecl>().match(ToTU, FunctionPattern);
3032 auto *ToFriend = LastDeclMatcher<FunctionDecl>().match(ToTU, FunctionPattern);
3063 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
3067 LookupRes = ToTU->noload_lookup(ToName);
3069 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 1u);
3072 LookupRes = ToTU->noload_lookup(ToName);
3074 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, Pattern), 2u);
3102 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
3104 ToTU, cxxRecordDecl(hasName("X")));
3105 auto *ToFriend = FirstDeclMatcher<FriendDecl>().match(ToTU, friendDecl());
3249 Decl *ToTU = getToTuDecl(Code, Lang_CXX11);
3251 ToTU, ClassMatcher);
3552 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
3554 FirstDeclMatcher<FieldDecl>().match(ToTU, fieldDecl(hasName("entry0")));
3556 FirstDeclMatcher<FieldDecl>().match(ToTU, fieldDecl(hasName("entry1")));
3612 Decl *ToTU = getToTuDecl(ClassTemplate +
3620 ToTU, classTemplateSpecializationDecl(hasName("X")));
3657 Decl *ToTU = getToTuDecl(ClassTemplate +
3678 FirstDeclMatcher<FunctionDecl>().match(ToTU, FunPattern);
3684 ToTU, classTemplateSpecializationDecl(hasName("X")));
3715 Decl *ToTU = getToTuDecl(ClassTemplate +
3742 EXPECT_EQ(1u, ToTU->getASTContext().getDiagnostics().getNumWarnings());
3750 ToTU, classTemplateSpecializationDecl(hasName("X"))));
3763 Decl *ToTU = getToTuDecl(ClassTemplate +
3784 FirstDeclMatcher<CXXConstructorDecl>().match(ToTU, CtorPattern);
3790 ToTU, classTemplateSpecializationDecl(hasName("X")));
3802 Decl *ToTU = getToTuDecl(Code, Lang_CXX11);
3807 ToTU, classTemplateSpecializationDecl());
3812 ToTU, classTemplateSpecializationDecl()));
3827 Decl *ToTU = getToTuDecl(Code, Lang_CXX11);
3834 ToTU, classTemplatePartialSpecializationDecl());
3839 ToTU, classTemplatePartialSpecializationDecl()));
3854 Decl *ToTU = getToTuDecl(Code, Lang_CXX11);
3859 ToTU, classTemplateSpecializationDecl());
3864 ToTU, classTemplateSpecializationDecl()));
3884 Decl *ToTU = getToTuDecl(PrimaryTemplate + FullSpec, Lang_CXX11);
3893 ToTU, classTemplatePartialSpecializationDecl()));
3896 ToTU, classTemplateSpecializationDecl(
3954 Decl *ToTU = getToTuDecl(StructA, Lang_CXX03);
3969 ToTU, varDecl(hasName("a"))); // Decl with init
3985 Decl *ToTU = getToTuDecl(StructA, Lang_CXX03);
4000 ToTU, varDecl(hasName("a")));
4084 Decl *ToTU = getToTuDecl("struct A { struct X *Xp; };", Lang_C99);
4087 auto ToProto = FirstDeclMatcher<RecordDecl>().match(ToTU, Pattern);
4093 EXPECT_EQ(DeclCounter<RecordDecl>().match(ToTU, Pattern), 2u);
4094 auto ToDef = LastDeclMatcher<RecordDecl>().match(ToTU, Pattern);
4102 Decl *ToTU = getToTuDecl("struct A { struct X *Xp; };", Lang_CXX03);
4105 auto ToProto = FirstDeclMatcher<RecordDecl>().match(ToTU, Pattern);
4111 EXPECT_EQ(DeclCounter<RecordDecl>().match(ToTU, Pattern), 2u);
4112 auto ToDef = LastDeclMatcher<RecordDecl>().match(ToTU, Pattern);
4129 Decl *ToTU = ImportedDef->getTranslationUnitDecl();
4132 EXPECT_EQ(DeclCounter<RecordDecl>().match(ToTU, Pattern), 2u);
4133 auto ToProto = FirstDeclMatcher<RecordDecl>().match(ToTU, Pattern);
4134 auto ToDef = LastDeclMatcher<RecordDecl>().match(ToTU, Pattern);
4359 Decl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
4360 EXPECT_EQ(DeclCounter<ClassTemplateSpecializationDecl>().match(ToTU, Pattern),
4405 Decl *ToTU = getToTuDecl(
4425 ToTU,
4458 Decl *ToTU = getToTuDecl(
4470 ToTU, classTemplateDecl(hasName("F")));
4547 Decl *ToTU = getToTuDecl(
4557 ToTU, classTemplateDecl(hasName("Y")));
4597 Decl *ToTU = getToTuDecl(
4607 ToTU, classTemplateDecl(hasName("Y")));
4653 Decl *ToTU = getToTuDecl(
4660 ToTU, classTemplateDecl(hasName("Y")));
4754 TranslationUnitDecl *ToTU = getToTuDecl(Code, Lang_CXX03);
4756 ToTU, functionDecl(hasName("foo")));
4855 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
4856 EXPECT_TRUE(MatchVerifier<Decl>{}.match(ToTU, Pattern));
4878 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
4879 EXPECT_TRUE(MatchVerifier<Decl>{}.match(ToTU, Pattern));
4902 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
4903 EXPECT_TRUE(MatchVerifier<Decl>{}.match(ToTU, Pattern));
4964 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
4967 DeclCounter<FunctionDecl>().match(ToTU, functionDecl(hasName("f"))));
5004 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
5005 EXPECT_EQ(0u, ToTU->getASTContext().getDiagnostics().getNumWarnings());
5020 Decl *ToTU = getToTuDecl(Code, Lang_CXX11);
5021 auto *ToD = FirstDeclMatcher<TypedefNameDecl>().match(ToTU,
5194 Decl *ToTU = getToTuDecl(
5206 ToTU, varTemplateDecl(hasName("X")));
5246 Decl *ToTU = getToTuDecl(
5255 ToTU, varTemplateDecl(hasName("X")));
5278 Decl *ToTU = getToTuDecl(
5288 ToTU, varTemplateSpecializationDecl(hasName("X")));
5555 auto *ToTU = getToTuDecl("int a;", Lang_CXX03);
5556 auto *D = FirstDeclMatcher<VarDecl>().match(ToTU, varDecl(hasName("a")));
5557 ASTImporterLookupTable LT(*ToTU);
5558 auto Res = LT.lookup(ToTU, D->getDeclName());
5580 TranslationUnitDecl *ToTU = getToTuDecl(Code, Lang_CXX03);
5582 ToTU, classTemplateDecl(hasName("X")));
5584 ToTU, functionDecl(hasName("foo")));
5588 ASSERT_EQ(cast<Decl>(FooDC), ToTU);
5607 ASTImporterLookupTable LT(*ToTU);
5615 TranslationUnitDecl *ToTU =
5618 FirstDeclMatcher<RecordDecl>().match(ToTU, recordDecl(hasName("Foo")));
5620 FirstDeclMatcher<RecordDecl>().match(ToTU, recordDecl(hasName("A")));
5624 ASSERT_EQ(cast<Decl>(FooDC), ToTU);
5643 ASTImporterLookupTable LT(*ToTU);
5650 TranslationUnitDecl *ToTU =
5653 .match(ToTU, varDecl(hasName("V")))
5656 FirstDeclMatcher<RecordDecl>().match(ToTU, recordDecl(hasName("A")));
5658 FirstDeclMatcher<RecordDecl>().match(ToTU, recordDecl(hasName("B")));
5660 ASTImporterLookupTable LT(*ToTU);
5665 ToTU, fieldDecl(hasName("V"),
5670 ToTU, fieldDecl(hasName("V"),
5672 Res = LT.lookup(ToTU, VName);
5675 ToTU, varDecl(hasName("V"),
5680 TranslationUnitDecl *ToTU = getToTuDecl(
5688 ASTImporterLookupTable LT(*ToTU);
5689 auto *F0 = FirstDeclMatcher<FunctionDecl>().match(ToTU, functionDecl());
5690 auto *F2 = LastDeclMatcher<FunctionDecl>().match(ToTU, functionDecl());
5692 auto Res = LT.lookup(ToTU, Name);
5700 TranslationUnitDecl *ToTU = getToTuDecl(
5708 ASTImporterLookupTable LT(*ToTU);
5710 ToTU, functionDecl(hasOverloadedOperatorName("+")));
5712 ToTU, functionDecl(hasOverloadedOperatorName("-")));
5714 auto ResPlus = LT.lookup(ToTU, NamePlus);
5719 auto ResMinus = LT.lookup(ToTU, NameMinus);
5727 TranslationUnitDecl *ToTU = getToTuDecl(
5734 ToTU, functionDecl(hasOverloadedOperatorName("+")));
5748 ASTImporterLookupTable LT(*ToTU);
5749 auto Res = LT.lookup(ToTU, ToPlus->getDeclName());
5754 Res = LT.lookup(ToTU, FromPlus->getDeclName());
5760 TranslationUnitDecl *ToTU = getToTuDecl(
5768 ASTImporterLookupTable LT(*ToTU);
5769 auto *FriendD = FirstDeclMatcher<FriendDecl>().match(ToTU, friendDecl());
5772 ToTU, cxxRecordDecl(hasName("Y")));
5775 auto Res = LT.lookup(ToTU, Name);
5785 TranslationUnitDecl *ToTU = getToTuDecl(
5794 ASTImporterLookupTable LT(*ToTU);
5795 auto *FriendD = FirstDeclMatcher<FriendDecl>().match(ToTU, friendDecl());
5797 auto *Y = FirstDeclMatcher<CXXRecordDecl>().match(ToTU, cxxRecordDecl(hasName("Y")));
5800 auto Res = LT.lookup(ToTU, Name);
5810 TranslationUnitDecl *ToTU = getToTuDecl(
5820 ASTImporterLookupTable LT(*ToTU);
5823 ToTU, typeAliasDecl(hasName("alias_of_f")));
5825 auto Res = LT.lookup(ToTU, Name);
5831 TranslationUnitDecl *ToTU = getToTuDecl(
5845 ASTImporterLookupTable LT(*ToTU);
5848 ToTU, usingDecl(hasName("InnerClass")));
5850 auto Res = LT.lookup(ToTU, Name);
5853 ToTU, namespaceDecl(hasName("a")));
5855 ToTU, cxxRecordDecl(hasName("B")));
5863 TranslationUnitDecl *ToTU = getToTuDecl(
5869 ASTImporterLookupTable LT(*ToTU);
5871 ToTU, classTemplateDecl(hasName("F")));
5873 auto Res = LT.lookup(ToTU, Name);
5880 TranslationUnitDecl *ToTU = getToTuDecl(
5892 ASTImporterLookupTable LT(*ToTU);
5894 ToTU, classTemplateDecl(hasName("F")));
5896 auto Res = LT.lookup(ToTU, Name);
5903 TranslationUnitDecl *ToTU = getToTuDecl(
5914 ASTImporterLookupTable LT(*ToTU);
5916 ToTU, classTemplateDecl(hasName("F")));
5918 auto Res = LT.lookup(ToTU, Name);
5926 TranslationUnitDecl *ToTU = getToTuDecl(
5932 ASTImporterLookupTable LT(*ToTU);
5934 FirstDeclMatcher<FunctionDecl>().match(ToTU, functionDecl(hasName("F")));
5936 auto Res = LT.lookup(ToTU, Name);
5943 TranslationUnitDecl *ToTU = getToTuDecl(
5955 ASTImporterLookupTable LT(*ToTU);
5958 ToTU, classTemplateDecl(hasName("X")));
5960 ToTU,
5964 ToTU, classTemplateSpecializationDecl(hasName("X")));
5991 TranslationUnitDecl *ToTU = getToTuDecl(
5997 ASTImporterLookupTable LT(*ToTU);
5999 ToTU, functionTemplateDecl(hasName("F")));
6001 auto Res = LT.lookup(ToTU, Name);
6008 TranslationUnitDecl *ToTU = getToTuDecl(
6020 ASTImporterLookupTable LT(*ToTU);
6022 ToTU, cxxRecordDecl(hasName("X")));
6023 auto *FriendD0 = FirstDeclMatcher<FriendDecl>().match(ToTU, friendDecl());
6024 auto *FriendD1 = LastDeclMatcher<FriendDecl>().match(ToTU, friendDecl());
6031 auto Res = LT.lookup(ToTU, Name);
6037 TranslationUnitDecl *ToTU = getToTuDecl(
6046 ASTImporterLookupTable LT(*ToTU);
6047 auto *E = FirstDeclMatcher<EnumDecl>().match(ToTU, enumDecl(hasName("E")));
6049 ToTU, enumConstantDecl(hasName("A")));
6053 ASSERT_EQ(E->getRedeclContext(), ToTU);
6061 ToTU->localUncachedLookup(Name, FoundDecls);
6070 Res = LT.lookup(ToTU, Name);
6076 TranslationUnitDecl *ToTU = getToTuDecl(
6086 ToTU, namespaceDecl(hasName("N")));
6088 LastDeclMatcher<NamespaceDecl>().match(ToTU, namespaceDecl(hasName("N")));
6089 auto *A = FirstDeclMatcher<VarDecl>().match(ToTU, varDecl(hasName("A")));
6092 ASTImporterLookupTable LT(*ToTU);
6133 auto *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
6135 EXPECT_EQ(0u, ToTU->getASTContext().getDiagnostics().getNumWarnings());
6141 Decl *ToTU = getToTuDecl(
6149 ToTU, functionTemplateDecl(hasName("foo")));
6224 TranslationUnitDecl *ToTU = getToTuDecl(
6247 ToTU, classTemplateSpecializationDecl(hasName("X"))),
6270 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
6273 DeclCounter<FunctionDecl>().match(ToTU, functionDecl(hasName("foo"))),
6301 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
6302 EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, functionDecl(hasName("f"))),
6306 FirstDeclMatcher<FunctionDecl>().match(ToTU, functionDecl(hasName("f")));
6510 Decl *ToTU = getToTuDecl(ToTUCode, Lang_CXX11);
6511 static_cast<void>(ToTU);
6527 TranslationUnitDecl *ToTU = getToTuDecl("class X;", Lang_CXX03);
6551 ToTU, cxxRecordDecl(hasName("X"), isDefinition()));
6559 ToTU, cxxRecordDecl(hasName("X"), unless(isDefinition())));
6657 Decl *ToTU = getToTuDecl(ToTUCode, Lang_CXX11);
6658 static_cast<void>(ToTU);
6695 Decl *ToTU = getToTuDecl(ToTUCode, Lang_CXX11);
6696 static_cast<void>(ToTU);
6819 TranslationUnitDecl *ToTU = getToTuDecl(Code, Lang_CXX03);
6823 ToTU, classTemplateDecl(hasName("Class")));
6825 ToTU, classTemplateDecl(hasName("Class")));
6865 TranslationUnitDecl *ToTU = getToTuDecl(
6873 ToTU, cxxRecordDecl(hasName("X")));
6876 ToTU->setHasExternalLexicalStorage(true);
6878 ToTU->setMustBuildLookupTable();
6880 ToTU->getASTContext().setExternalSource(new TestExternalASTSource());
6904 TranslationUnitDecl *ToTU = getToTuDecl("", Lang_CXX03);
6908 ToTU, typedefDecl(hasName(TypeName)));
7059 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
7061 EXPECT_EQ(DeclCounter<CXXRecordDecl>().match(ToTU, cxxRecordDecl(isLambda())),
7083 TranslationUnitDecl *ToTU = ToAST->getASTContext().getTranslationUnitDecl();
7085 EXPECT_EQ(DeclCounter<CXXRecordDecl>().match(ToTU, cxxRecordDecl(isLambda())),
8449 TranslationUnitDecl *ToTU = ToC->getTranslationUnitDecl();
8452 CheckAST(ToTU, ToC);
8614 TranslationUnitDecl *ToTU = ToD2->getTranslationUnitDecl();
8617 CheckAST(ToTU, ToD2);
8637 TranslationUnitDecl *ToTU = ToB->getTranslationUnitDecl();
8640 ToTU, usingDecl(hasParent(equalsNode(ToB))));
8642 ToTU, usingShadowDecl(hasTargetDecl(
8645 ToTU, usingShadowDecl(hasTargetDecl(
8912 Decl *ToTU = getToTuDecl(
8920 ToTU,
8947 Decl *ToTU = getToTuDecl(
8958 ToTU,
9077 Decl *ToTU = getToTuDecl(
9092 ToTU, functionDecl(hasName("bar")));
9130 void testImport(Decl *ToTU, Decl *FromTU, Decl *FromD) {
9204 Decl *ToTU = getToTuDecl(ToCodeA, Lang_CXX11);
9208 testImport(ToTU, FromTU, FromA);
9212 Decl *ToTU = getToTuDecl(ToCodeA, Lang_CXX11);
9216 testImport(ToTU, FromTU, FromA);
9220 Decl *ToTU = getToTuDecl(ToCodeA, Lang_CXX11);
9224 testImport(ToTU, FromTU, FromA);
9228 Decl *ToTU = getToTuDecl(ToCodeADef, Lang_CXX11);
9232 testImport(ToTU, FromTU, FromA);
9236 Decl *ToTU = getToTuDecl(ToCodeADef, Lang_CXX11);
9240 testImport(ToTU, FromTU, FromA);
9244 Decl *ToTU = getToTuDecl(ToCodeADef, Lang_CXX11);
9248 testImport(ToTU, FromTU, FromA);
9252 Decl *ToTU = getToTuDecl(ToCodeC, Lang_CXX11);
9256 testImport(ToTU, FromTU, FromC);
9260 Decl *ToTU = getToTuDecl(ToCodeC, Lang_CXX11);
9264 testImport(ToTU, FromTU, FromC);
9268 Decl *ToTU = getToTuDecl(ToCodeCDef, Lang_CXX11);
9272 testImport(ToTU, FromTU, FromC);
9276 Decl *ToTU = getToTuDecl(ToCodeCDef, Lang_CXX11);
9280 testImport(ToTU, FromTU, FromC);
9284 Decl *ToTU = getToTuDecl("", Lang_CXX11);
9288 testImport(ToTU, FromTU, FromD);
9292 Decl *ToTU = getToTuDecl(ToCodeCDef, Lang_CXX11);
9296 testImport(ToTU, FromTU, FromD);
9300 Decl *ToTU = getToTuDecl(
9328 FirstDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("A1")));
9367 Decl *ToTU = getToTuDecl(TestCode, Lang_CXX11);
9371 ToTU, typeAliasDecl(hasName("C")));
9379 ToTU, classTemplateDecl(hasName("B")));
9381 ToTU, classTemplateDecl(hasName("B")));
9460 Decl *ToTU = getToTuDecl(Code, Lang_C99);
9469 FirstDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("T")));
9471 LastDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("T")));
9482 Decl *ToTU = getToTuDecl(Code, Lang_C99);
9491 FirstDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("T")));
9493 LastDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("T")));
9508 Decl *ToTU = getToTuDecl("", Lang_C99);
9521 FirstDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("T1")));
9523 FirstDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("T2")));
9535 Decl *ToTU = getToTuDecl(Code, Lang_C99);
9544 FirstDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("T")));
9546 LastDeclMatcher<TypedefDecl>().match(ToTU, typedefDecl(hasName("T")));
9554 ToTU, recordDecl(hasDescendant(fieldDecl(hasName("fff")))));
9612 Decl *ToTU = getToTuDecl(CodeTo, Lang_CXX11);
9616 ToTU, functionDecl(hasName("f1"), isInstantiated()));
9623 ToTU, classTemplateSpecializationDecl(hasName("X")));
9642 // LastDeclMatcher<FunctionDecl>().match(ToTU,
9783 Decl *ToTU = getToTuDecl(ToCode, Lang_CXX11);
9785 ToTU, enumDecl(hasEnumConstName("E1")));
9787 ToTU, enumDecl(hasEnumConstName("E3")));
9815 Decl *ToTU = getToTuDecl(ToCode, Lang_CXX11);
9816 auto *ToE1 = FirstDeclMatcher<EnumDecl>().match(ToTU, enumDecl());
9838 Decl *ToTU = getToTuDecl("", Lang_CXX03);
9861 ToTU, tagDecl(has(enumDecl(has(EnumConstA)))));
9863 ToTU, tagDecl(has(enumDecl(has(EnumConstB)))));
9868 FirstDeclMatcher<EnumDecl>().match(ToTU, enumDecl(has(EnumConstA)));
9870 FirstDeclMatcher<EnumDecl>().match(ToTU, enumDecl(has(EnumConstB)));
9995 TranslationUnitDecl *ToTU = getToTuDecl(ToCode, Lang_CXX14);
9997 ToTU, functionTemplateDecl(hasName("f")));
10065 TranslationUnitDecl *ToTU = getToTuDecl(CodeFunction, Lang_CXX14);
10067 ToTU, functionTemplateDecl(hasName("test")));
10086 TranslationUnitDecl *ToTU = getToTuDecl(CodeClass, Lang_CXX14);
10088 ToTU, classTemplateDecl(hasName("test")));
10107 TranslationUnitDecl *ToTU = getToTuDecl(CodeVar, Lang_CXX14);
10109 ToTU, varTemplateDecl(hasName("test")));
10277 Decl *ToTU = getToTuDecl(ToCode, Lang_CXX11);
10288 ToTU, cxxRecordDecl(hasName("X")));
10302 Decl *ToTU = getToTuDecl(ToCode, Lang_CXX11);
10313 ToTU, cxxRecordDecl(hasName("X")));
10324 Decl *ToTU = getToTuDecl(ToCode, Lang_CXX11);
10326 ToTU, classTemplateDecl(hasName("X")));
10369 Decl *ToTU = getToTuDecl(
10396 auto *ToFr1 = FirstDeclMatcher<FriendDecl>().match(ToTU, friendDecl());
10421 Decl *ToTU = getToTuDecl(
10448 auto *ToFr1 = FirstDeclMatcher<FriendDecl>().match(ToTU, friendDecl());
10449 auto *ToFr2 = LastDeclMatcher<FriendDecl>().match(ToTU, friendDecl());