BoundNodesTreeBuilder Result(*Builder);
if (InnerMatcher.matches(*Node.getArg(I)->IgnoreParenImpCasts(), Finder,
&Result)) {
- *Builder = Result;
+ *Builder = std::move(Result);
return true;
}
}
Result.addMatch(CaseBuilder);
}
}
- *Builder = Result;
+ *Builder = std::move(Result);
return Matched;
}
Result.addMatch(InitBuilder);
}
}
- *Builder = Result;
+ *Builder = std::move(Result);
return Matched;
}
// Delete all bindings when a matcher does not match.
// This prevents unexpected exposure of bound nodes in unmatches
// branches of the match tree.
- *Builder = BoundNodesTreeBuilder();
+ Builder->removeBindings([](const BoundNodesMap &) { return true; });
return false;
}
for (IteratorT I = Start; I != End; ++I) {
BoundNodesTreeBuilder Result(*Builder);
if (Matcher.matches(*I, Finder, &Result)) {
- *Builder = Result;
+ *Builder = std::move(Result);
return true;
}
}
for (IteratorT I = Start; I != End; ++I) {
BoundNodesTreeBuilder Result(*Builder);
if (Matcher.matches(**I, Finder, &Result)) {
- *Builder = Result;
+ *Builder = std::move(Result);
return true;
}
}
Result.addMatch(BuilderInner);
}
}
- *Builder = Result;
+ *Builder = std::move(Result);
return Matched;
}
for (size_t i = 0, e = InnerMatchers.size(); i != e; ++i) {
BoundNodesTreeBuilder Result = *Builder;
if (InnerMatchers[i].matches(DynNode, Finder, &Result)) {
- *Builder = Result;
+ *Builder = std::move(Result);
return true;
}
}