summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/ASTMatchersTest.h
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2012-11-11 22:14:55 +0000
committerDaniel Jasper <djasper@google.com>2012-11-11 22:14:55 +0000
commit33806cdefcffb091515bc329158d8c05714aa01a (patch)
treec6e61cc59a7223c299e05c11f30a32d6fe125c3b /clang/unittests/ASTMatchers/ASTMatchersTest.h
parent07351f8e78b415907342591a5a067e9efcd837e4 (diff)
downloadbcm5719-llvm-33806cdefcffb091515bc329158d8c05714aa01a.tar.gz
bcm5719-llvm-33806cdefcffb091515bc329158d8c05714aa01a.zip
Fix binding of nodes in case of forEach..() matchers.
When recursively visiting the generated matches, the aggregated bindings need to be copied during the recursion. Otherwise, we they might not be properly overwritten (which is shown by the test), or there might be bound nodes present that were bound on a different matching branch. Review: http://llvm-reviews.chandlerc.com/D112 llvm-svn: 167695
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.h')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.h b/clang/unittests/ASTMatchers/ASTMatchersTest.h
index 5e63b6bb119..3b23ada8da7 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.h
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.h
@@ -38,7 +38,7 @@ public:
virtual void run(const MatchFinder::MatchResult &Result) {
if (FindResultReviewer != NULL) {
- *Verified = FindResultReviewer->run(&Result.Nodes, Result.Context);
+ *Verified |= FindResultReviewer->run(&Result.Nodes, Result.Context);
} else {
*Verified = true;
}
OpenPOWER on IntegriCloud