From: Hans Wennborg Date: Thu, 24 May 2018 10:49:38 +0000 (+0000) Subject: Fix ASTImporterTest on Windows after r333082 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6b61dec4f1388cbe08e1e486af065aeadd3505a;p=clang Fix ASTImporterTest on Windows after r333082 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 --- diff --git a/unittests/AST/ASTImporterTest.cpp b/unittests/AST/ASTImporterTest.cpp index 8080d54346..c95e8fdaf8 100644 --- a/unittests/AST/ASTImporterTest.cpp +++ b/unittests/AST/ASTImporterTest.cpp @@ -1500,7 +1500,7 @@ TEST_P(ASTImporterTestBase, )", Lang_CXX); ASSERT_EQ(2u, DeclCounter().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().match( - ToTU, cxxRecordDecl(hasParent(translationUnitDecl())))); + ToTU, cxxRecordDecl(unless(isImplicit())))); } TEST_P(