[cfe-commits] [PATCH] Fix binding of nodes in case of forEach..() matchers.
Manuel Klimek
klimek at google.com
Sun Nov 11 14:08:45 PST 2012
Otherwise lgtm
================
Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:59
@@ -58,3 +58,3 @@
visitMatchesRecursively(Visitor* ResultVisitor,
- BoundNodesMap* AggregatedBindings) {
- Bindings.copyTo(AggregatedBindings);
+ const BoundNodesMap& AggregatedBindings) {
+ BoundNodesMap CombinedBindings;
----------------
Daniel Jasper wrote:
> Manuel Klimek wrote:
> > Why can't we pass by-value here?
> We could. I wanted to make it very explicit that copying is going on here. That might have prevented the previous regression.
I'd at least say:
BoundNodesMap CombinedBindings(AggregatedBindings);
...
Otherwise at least to me that looks strange.
http://llvm-reviews.chandlerc.com/D112
More information about the cfe-commits
mailing list