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.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index f16e5a0cf04..e074c6ecc05 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -654,20 +654,6 @@ TEST(DeclarationMatcher, HasDescendantMemoization) {
EXPECT_TRUE(matches("void f() { int i; }", CannotMemoize));
}
-TEST(DeclarationMatcher, HasDescendantMemoizationUsesRestrictKind) {
- auto Name = hasName("i");
- auto VD = internal::Matcher<VarDecl>(Name).dynCastTo<Decl>();
- auto RD = internal::Matcher<RecordDecl>(Name).dynCastTo<Decl>();
- // Matching VD first should not make a cache hit for RD.
- EXPECT_TRUE(notMatches("void f() { int i; }",
- decl(hasDescendant(VD), hasDescendant(RD))));
- EXPECT_TRUE(notMatches("void f() { int i; }",
- decl(hasDescendant(RD), hasDescendant(VD))));
- // Not matching RD first should not make a cache hit for VD either.
- EXPECT_TRUE(matches("void f() { int i; }",
- decl(anyOf(hasDescendant(RD), hasDescendant(VD)))));
-}
-
TEST(DeclarationMatcher, HasAttr) {
EXPECT_TRUE(matches("struct __attribute__((warn_unused)) X {};",
decl(hasAttr(clang::attr::WarnUnused))));
OpenPOWER on IntegriCloud