summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 6d81bd88b9e..476a0be2904 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -1355,29 +1355,6 @@ TEST(Matcher, VarDecl_Storage) {
EXPECT_TRUE(matches("void f() { static int X; }", M));
}
-TEST(Matcher, VarDecl_StorageDuration) {
- std::string T =
- "void f() { int x; static int y; thread_local int z; } 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())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasThreadStorageDuration())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("y"), hasThreadStorageDuration())));
- EXPECT_TRUE(notMatches(T, varDecl(hasName("a"), hasThreadStorageDuration())));
-}
-
TEST(Matcher, FindsVarDeclInFunctionParameter) {
EXPECT_TRUE(matches(
"void f(int i) {}",
OpenPOWER on IntegriCloud