summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
diff options
context:
space:
mode:
authorSamuel Benzaquen <sbenza@google.com>2014-10-06 13:14:30 +0000
committerSamuel Benzaquen <sbenza@google.com>2014-10-06 13:14:30 +0000
commita117002d93b1f0e9488a68d5d3b540ca795bc9e5 (patch)
tree71f19d127eb772033bf647f2b86152bac7d43702 /clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
parentfaef77480d0ff27dca79b4a60f6863bf97d30854 (diff)
downloadbcm5719-llvm-a117002d93b1f0e9488a68d5d3b540ca795bc9e5.tar.gz
bcm5719-llvm-a117002d93b1f0e9488a68d5d3b540ca795bc9e5.zip
Fix bug in DynTypedMatcher::constructVariadic() that would cause false negatives.
Summary: DynTypedMatcher::constructVariadic() where the restrict kind of the different matchers are not related causes the matcher to have a "None" restrict kind. This causes false negatives for anyOf and eachOf. Change the logic to get a common ancestor if there is one. Also added regression tests that fail without the fix. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D5580 llvm-svn: 219118
Diffstat (limited to 'clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp b/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
index f8a9430f169..824b310442a 100644
--- a/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
+++ b/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
@@ -347,7 +347,7 @@ TEST_F(RegistryTest, VariadicOp) {
"anyOf",
constructMatcher("recordDecl",
constructMatcher("hasName", std::string("Foo"))),
- constructMatcher("namedDecl",
+ constructMatcher("functionDecl",
constructMatcher("hasName", std::string("foo"))))
.getTypedMatcher<Decl>();
OpenPOWER on IntegriCloud