summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
index bf2c08a5aa9..6c8a5e000f4 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
@@ -82,13 +82,11 @@ TEST(NameableDeclaration, REMatchesVariousDecls) {
TEST(DeclarationMatcher, MatchClass) {
DeclarationMatcher ClassMatcher(recordDecl());
- llvm::Triple Triple(llvm::sys::getDefaultTargetTriple());
- if (Triple.getOS() != llvm::Triple::Win32 ||
- Triple.getEnvironment() != llvm::Triple::MSVC)
- EXPECT_FALSE(matches("", ClassMatcher));
- else
- // Matches class type_info.
- EXPECT_TRUE(matches("", ClassMatcher));
+
+ // This passes on Windows only because we explicitly pass -target
+ // i386-unknown-unknown. If we were to compile with the default target
+ // triple, we'd want to EXPECT_TRUE if it's Win32 or MSVC.
+ EXPECT_FALSE(matches("", ClassMatcher));
DeclarationMatcher ClassX = recordDecl(recordDecl(hasName("X")));
EXPECT_TRUE(matches("class X;", ClassX));
OpenPOWER on IntegriCloud