15 const clang::ast_matchers::internal::BoundNodesMap &Nodes)
const {
21 llvm::ArrayRef<StringRef> NameList)
22 : NameMatchers(NameList.begin(), NameList.end()) {}
27 const QualType &Node, ast_matchers::internal::ASTMatchFinder *Finder,
28 ast_matchers::internal::BoundNodesTreeBuilder *
Builder)
const {
30 if (NameMatchers.empty())
33 PrintingPolicy PrintingPolicyWithSuppressedTag(
34 Finder->getASTContext().getLangOpts());
35 PrintingPolicyWithSuppressedTag.PrintCanonicalTypes =
true;
36 PrintingPolicyWithSuppressedTag.SuppressElaboration =
true;
37 PrintingPolicyWithSuppressedTag.SuppressScope =
false;
38 PrintingPolicyWithSuppressedTag.SuppressTagKeyword =
true;
39 PrintingPolicyWithSuppressedTag.SuppressUnwrittenScope =
true;
40 std::string TypeName =
41 Node.getUnqualifiedType().getAsString(PrintingPolicyWithSuppressedTag);
43 return llvm::any_of(NameMatchers, [&TypeName](
const llvm::Regex &NM) {
44 return NM.isValid() && NM.match(TypeName);
CodeCompletionBuilder Builder
::clang::DynTypedNode Node
MatchesAnyListedTypeNameMatcher(llvm::ArrayRef< StringRef > NameList)
~MatchesAnyListedTypeNameMatcher() override
bool matches(const QualType &Node, ast_matchers::internal::ASTMatchFinder *Finder, ast_matchers::internal::BoundNodesTreeBuilder *Builder) const override
bool areStatementsIdentical(const Stmt *FirstStmt, const Stmt *SecondStmt, const ASTContext &Context, bool Canonical)
bool operator()(const clang::ast_matchers::internal::BoundNodesMap &Nodes) const
::clang::DynTypedNode Node