summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2015-11-18 18:37:29 +0000
committerAaron Ballman <aaron@aaronballman.com>2015-11-18 18:37:29 +0000
commitf08e1848157fae1f6a5466dc2192694ad04d7ba5 (patch)
tree2bb1eb11621d924e7065cf6e7c5bfa2ac5513324
parent6247bed9bd55bddcce9ce731afd5452581652fb8 (diff)
downloadbcm5719-llvm-f08e1848157fae1f6a5466dc2192694ad04d7ba5.tar.gz
bcm5719-llvm-f08e1848157fae1f6a5466dc2192694ad04d7ba5.zip
Removing the AST matcher test for thread_local storage duration. Not all platforms support TLS, and on platforms that do not support it, use of thread_local causes an error. Since there's no way to determine whether the testing platform supports TLS, there's no way to know whether the test is safe to run or not. I will explore ways to enable this test, but this will appease at least one more build bot.
llvm-svn: 253486
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 6d81bd88b9e..2433d9faf1b 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -1357,22 +1357,22 @@ TEST(Matcher, VarDecl_Storage) {
TEST(Matcher, VarDecl_StorageDuration) {
std::string T =
- "void f() { int x; static int y; thread_local int z; } int a;";
+ "void f() { int x; static int y; } int a;";
EXPECT_TRUE(matches(T, varDecl(hasName("x"), hasAutomaticStorageDuration())));
EXPECT_TRUE(
notMatches(T, varDecl(hasName("y"), hasAutomaticStorageDuration())));
EXPECT_TRUE(
- notMatches(T, varDecl(hasName("z"), hasAutomaticStorageDuration())));
- EXPECT_TRUE(
notMatches(T, varDecl(hasName("a"), hasAutomaticStorageDuration())));
EXPECT_TRUE(matches(T, varDecl(hasName("y"), hasStaticStorageDuration())));
EXPECT_TRUE(matches(T, varDecl(hasName("a"), hasStaticStorageDuration())));
EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasStaticStorageDuration())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("z"), hasStaticStorageDuration())));
- EXPECT_TRUE(matches(T, varDecl(hasName("z"), hasThreadStorageDuration())));
+ // FIXME: It is really hard to test with thread_local itself because not all
+ // targets support TLS, which causes this to be an error depending on what
+ // platform the test is being run on. We do not have access to the TargetInfo
+ // object to be able to test whether the platform supports TLS or not.
EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasThreadStorageDuration())));
EXPECT_TRUE(notMatches(T, varDecl(hasName("y"), hasThreadStorageDuration())));
EXPECT_TRUE(notMatches(T, varDecl(hasName("a"), hasThreadStorageDuration())));
OpenPOWER on IntegriCloud