[cfe-commits] [PATCH] Fix binding of nodes in case of forEach..() matchers.
Manuel Klimek
klimek at google.com
Sun Nov 11 12:07:03 PST 2012
That was a regression I introduced in r162804 (the map was passed by-value before).
================
Comment at: unittests/ASTMatchers/ASTMatchersTest.cpp:2788
@@ -2778,1 +2787,3 @@
+}
+
----------------
Remove empty line.
================
Comment at: unittests/ASTMatchers/ASTMatchersTest.h:41
@@ -40,3 +40,3 @@
if (FindResultReviewer != NULL) {
- *Verified = FindResultReviewer->run(&Result.Nodes, Result.Context);
+ *Verified |= FindResultReviewer->run(&Result.Nodes, Result.Context);
} else {
----------------
How sure are you that there are no tests that rely on this to catch regressions?
================
Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:59
@@ -58,3 +58,3 @@
visitMatchesRecursively(Visitor* ResultVisitor,
- BoundNodesMap* AggregatedBindings) {
- Bindings.copyTo(AggregatedBindings);
+ const BoundNodesMap& AggregatedBindings) {
+ BoundNodesMap CombinedBindings;
----------------
Why can't we pass by-value here?
http://llvm-reviews.chandlerc.com/D112
More information about the cfe-commits
mailing list