[cfe-commits] [PATCH] Fix binding of nodes in case of forEach..() matchers.
Daniel Jasper
djasper at google.com
Sun Nov 11 14:18:32 PST 2012
Submitted as r167695.
================
Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:59
@@ -58,3 +58,3 @@
visitMatchesRecursively(Visitor* ResultVisitor,
- BoundNodesMap* AggregatedBindings) {
- Bindings.copyTo(AggregatedBindings);
+ const BoundNodesMap& AggregatedBindings) {
+ BoundNodesMap CombinedBindings;
----------------
Manuel Klimek wrote:
> 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.
Done.
http://llvm-reviews.chandlerc.com/D112
More information about the cfe-commits
mailing list