diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-09-29 23:56:21 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-09-29 23:56:21 +0000 |
commit | 13f0aeb6ee2aa72abaf105824a9ca2619bf5ba6d (patch) | |
tree | bf08deed351609784b2f49f577482ab73244eb96 /clang/unittests/ASTMatchers/ASTMatchersTest.cpp | |
parent | 8c27a52eb8f5353ed94b86c5ede21faaab7c2da7 (diff) | |
download | bcm5719-llvm-13f0aeb6ee2aa72abaf105824a9ca2619bf5ba6d.tar.gz bcm5719-llvm-13f0aeb6ee2aa72abaf105824a9ca2619bf5ba6d.zip |
Revert r218616, "Refactor Matcher<T> and DynTypedMatcher to reduce overhead of casts."
MSC17, aka VS2012, cannot compile it.
clang/include/clang/ASTMatchers/ASTMatchersInternal.h(387) : error C4519: default template arguments are only allowed on a class template
clang/include/clang/ASTMatchers/ASTMatchersInternal.h(443) : see reference to class template instantiation 'clang::ast_matchers::internal::Matcher<T>' being compiled
llvm-svn: 218648
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersTest.cpp | 14 |
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)))); |