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,46 @@ new internal::HasNameMatcher({std::string(Name)})); } +template +inline internal::Matcher +withIntrospection(std::string BeforeTag, std::string AfterTag, + const internal::Matcher &InnerMatcher) { + return internal::Matcher(new internal::WithIntrospectionMatcher( + BeforeTag, AfterTag, InnerMatcher)); +} + +template class MatcherT, + typename ReturnTypesF, typename... ParamTypes> +inline internal::PolymorphicWithIntrospectionMatcher +withIntrospection( + std::string BeforeTag, std::string AfterTag, + const internal::PolymorphicMatcher + &InnerMatcher) { + return internal::PolymorphicWithIntrospectionMatcher( + BeforeTag, AfterTag, InnerMatcher); +} + +template +inline internal::Matcher +withIntrospection(const internal::Matcher &InnerMatcher) { + return internal::Matcher( + new internal::WithIntrospectionMatcher(InnerMatcher)); +} + +template