]> granicus.if.org Git - clang/commitdiff
Fix ASTImporterTest on Windows after r333082
authorHans Wennborg <hans@hanshq.net>
Thu, 24 May 2018 10:49:38 +0000 (10:49 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 24 May 2018 10:49:38 +0000 (10:49 +0000)
With MS compatibility, Sema adds an implicit definition of type_info,
which was causing the matchers to return 3 instead of 2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333170 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/AST/ASTImporterTest.cpp

index 8080d54346db92eddda1339779d324728652ec8c..c95e8fdaf80ab2baa7318f156f02857f04f1e9ec 100644 (file)
@@ -1500,7 +1500,7 @@ TEST_P(ASTImporterTestBase,
       )",
       Lang_CXX);
   ASSERT_EQ(2u, DeclCounter<CXXRecordDecl>().match(
-                    ToTU, cxxRecordDecl(hasParent(translationUnitDecl()))));
+                    ToTU, cxxRecordDecl(unless(isImplicit()))));
 
   Decl *FromTU = getTuDecl(
       R"(
@@ -1515,7 +1515,7 @@ TEST_P(ASTImporterTestBase,
   Import(FromD, Lang_CXX);
 
   EXPECT_EQ(2u, DeclCounter<CXXRecordDecl>().match(
-                    ToTU, cxxRecordDecl(hasParent(translationUnitDecl()))));
+                    ToTU, cxxRecordDecl(unless(isImplicit()))));
 }
 
 TEST_P(