diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h --- a/clang/include/clang/ASTMatchers/ASTMatchers.h +++ b/clang/include/clang/ASTMatchers/ASTMatchers.h @@ -2993,6 +2993,40 @@ new internal::HasNameMatcher({std::string(Name)})); } +template +inline internal::Matcher withTag(std::string BeforeTag, std::string AfterTag, + const internal::Matcher &InnerMatcher) { + return internal::Matcher( + new internal::WithTagMatcher(BeforeTag, AfterTag, InnerMatcher)); +} + +template class MatcherT, + typename ReturnTypesF, typename... ParamTypes> +inline internal::PolymorphicWithTagMatcher +withTag(std::string BeforeTag, std::string AfterTag, + const internal::PolymorphicMatcher &InnerMatcher) { + return internal::PolymorphicWithTagMatcher(BeforeTag, AfterTag, + InnerMatcher); +} + +template +inline internal::Matcher withTag(const internal::Matcher &InnerMatcher) { + return internal::Matcher(new internal::WithTagMatcher(InnerMatcher)); +} + +template