summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Refactoring/Transformer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Tooling/Refactoring/Transformer.cpp')
-rw-r--r--clang/lib/Tooling/Refactoring/Transformer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Tooling/Refactoring/Transformer.cpp b/clang/lib/Tooling/Refactoring/Transformer.cpp
index 24f9b58897e..c27739c5962 100644
--- a/clang/lib/Tooling/Refactoring/Transformer.cpp
+++ b/clang/lib/Tooling/Refactoring/Transformer.cpp
@@ -98,8 +98,10 @@ static std::vector<DynTypedMatcher> taggedMatchers(
Matchers.reserve(Cases.size());
for (const auto &Case : Cases) {
std::string Tag = (TagBase + Twine(Case.first)).str();
- auto M = Case.second.Matcher.tryBind(Tag);
- assert(M && "RewriteRule matchers should be bindable.");
+ // HACK: Many matchers are not bindable, so ensure that tryBind will work.
+ DynTypedMatcher BoundMatcher(Case.second.Matcher);
+ BoundMatcher.setAllowBind(true);
+ auto M = BoundMatcher.tryBind(Tag);
Matchers.push_back(*std::move(M));
}
return Matchers;
OpenPOWER on IntegriCloud