r333170 - Fix ASTImporterTest on Windows after r333082
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Thu May 24 03:49:38 PDT 2018
Author: hans
Date: Thu May 24 03:49:38 2018
New Revision: 333170
URL: http://llvm.org/viewvc/llvm-project?rev=333170&view=rev
Log:
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.
Modified:
cfe/trunk/unittests/AST/ASTImporterTest.cpp
Modified: cfe/trunk/unittests/AST/ASTImporterTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/ASTImporterTest.cpp?rev=333170&r1=333169&r2=333170&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/ASTImporterTest.cpp (original)
+++ cfe/trunk/unittests/AST/ASTImporterTest.cpp Thu May 24 03:49:38 2018
@@ -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(
More information about the cfe-commits
mailing list