clang 20.0.0git
Classes | Functions
clang::ast_matchers::internal Namespace Reference

Classes

class  CollectMatchesCallback
 

Functions

static bool notUnaryOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
 
static bool allOfVariadicOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
 
static bool eachOfVariadicOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
 
static bool anyOfVariadicOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
 
static bool optionallyVariadicOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
 
bool matchesAnyBase (const CXXRecordDecl &Node, const Matcher< CXXBaseSpecifier > &BaseSpecMatcher, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder)
 
static std::vector< std::string > vectorFromRefs (ArrayRef< const StringRef * > NameRefs)
 
Matcher< NamedDeclhasAnyNameFunc (ArrayRef< const StringRef * > NameRefs)
 
Matcher< ObjCMessageExprhasAnySelectorFunc (ArrayRef< const StringRef * > NameRefs)
 
HasOpNameMatcher hasAnyOperatorNameFunc (ArrayRef< const StringRef * > NameRefs)
 
HasOverloadOpNameMatcher hasAnyOverloadedOperatorNameFunc (ArrayRef< const StringRef * > NameRefs)
 
static bool consumeNameSuffix (StringRef &FullName, StringRef Suffix)
 
static StringRef getNodeName (const NamedDecl &Node, llvm::SmallString< 128 > &Scratch)
 
static StringRef getNodeName (const RecordDecl &Node, llvm::SmallString< 128 > &Scratch)
 
static StringRef getNodeName (const NamespaceDecl &Node, llvm::SmallString< 128 > &Scratch)
 
static bool isTokenAtLoc (const SourceManager &SM, const LangOptions &LangOpts, StringRef Text, SourceLocation Loc)
 
std::optional< SourceLocationgetExpansionLocOfMacro (StringRef MacroName, SourceLocation Loc, const ASTContext &Context)
 
std::shared_ptr< llvm::Regex > createAndVerifyRegex (StringRef Regex, llvm::Regex::RegexFlags Flags, StringRef MatcherID)
 

Function Documentation

◆ allOfVariadicOperator()

static bool clang::ast_matchers::internal::allOfVariadicOperator ( const DynTypedNode DynNode,
ASTMatchFinder *  Finder,
BoundNodesTreeBuilder *  Builder,
ArrayRef< DynTypedMatcher >  InnerMatchers 
)
static

Definition at line 387 of file ASTMatchersInternal.cpp.

◆ anyOfVariadicOperator()

static bool clang::ast_matchers::internal::anyOfVariadicOperator ( const DynTypedNode DynNode,
ASTMatchFinder *  Finder,
BoundNodesTreeBuilder *  Builder,
ArrayRef< DynTypedMatcher >  InnerMatchers 
)
static

Definition at line 416 of file ASTMatchersInternal.cpp.

References clang::Result.

◆ consumeNameSuffix()

static bool clang::ast_matchers::internal::consumeNameSuffix ( StringRef &  FullName,
StringRef  Suffix 
)
static

Definition at line 481 of file ASTMatchersInternal.cpp.

References consumeNameSuffix(), and FullName.

Referenced by consumeNameSuffix().

◆ createAndVerifyRegex()

std::shared_ptr< llvm::Regex > clang::ast_matchers::internal::createAndVerifyRegex ( StringRef  Regex,
llvm::Regex::RegexFlags  Flags,
StringRef  MatcherID 
)

Definition at line 719 of file ASTMatchersInternal.cpp.

References createAndVerifyRegex(), and MatcherID.

Referenced by createAndVerifyRegex().

◆ eachOfVariadicOperator()

static bool clang::ast_matchers::internal::eachOfVariadicOperator ( const DynTypedNode DynNode,
ASTMatchFinder *  Finder,
BoundNodesTreeBuilder *  Builder,
ArrayRef< DynTypedMatcher >  InnerMatchers 
)
static

Definition at line 399 of file ASTMatchersInternal.cpp.

References clang::Result.

◆ getExpansionLocOfMacro()

std::optional< SourceLocation > clang::ast_matchers::internal::getExpansionLocOfMacro ( StringRef  MacroName,
SourceLocation  Loc,
const ASTContext Context 
)

◆ getNodeName() [1/3]

static StringRef clang::ast_matchers::internal::getNodeName ( const NamedDecl Node,
llvm::SmallString< 128 > &  Scratch 
)
static

Definition at line 495 of file ASTMatchersInternal.cpp.

References getNodeName(), and Node.

Referenced by getNodeName().

◆ getNodeName() [2/3]

static StringRef clang::ast_matchers::internal::getNodeName ( const NamespaceDecl Node,
llvm::SmallString< 128 > &  Scratch 
)
static

Definition at line 521 of file ASTMatchersInternal.cpp.

References getNodeName(), and Node.

◆ getNodeName() [3/3]

static StringRef clang::ast_matchers::internal::getNodeName ( const RecordDecl Node,
llvm::SmallString< 128 > &  Scratch 
)
static

Definition at line 512 of file ASTMatchersInternal.cpp.

References getNodeName(), and Node.

◆ hasAnyNameFunc()

Matcher< NamedDecl > clang::ast_matchers::internal::hasAnyNameFunc ( ArrayRef< const StringRef * >  NameRefs)

Definition at line 452 of file ASTMatchersInternal.cpp.

References vectorFromRefs().

◆ hasAnyOperatorNameFunc()

HasOpNameMatcher clang::ast_matchers::internal::hasAnyOperatorNameFunc ( ArrayRef< const StringRef * >  NameRefs)

Definition at line 462 of file ASTMatchersInternal.cpp.

References vectorFromRefs().

◆ hasAnyOverloadedOperatorNameFunc()

HasOverloadOpNameMatcher clang::ast_matchers::internal::hasAnyOverloadedOperatorNameFunc ( ArrayRef< const StringRef * >  NameRefs)

Definition at line 467 of file ASTMatchersInternal.cpp.

References vectorFromRefs().

◆ hasAnySelectorFunc()

Matcher< ObjCMessageExpr > clang::ast_matchers::internal::hasAnySelectorFunc ( ArrayRef< const StringRef * >  NameRefs)

Definition at line 457 of file ASTMatchersInternal.cpp.

References vectorFromRefs().

◆ isTokenAtLoc()

static bool clang::ast_matchers::internal::isTokenAtLoc ( const SourceManager SM,
const LangOptions LangOpts,
StringRef  Text,
SourceLocation  Loc 
)
static

◆ matchesAnyBase()

bool clang::ast_matchers::internal::matchesAnyBase ( const CXXRecordDecl Node,
const Matcher< CXXBaseSpecifier > &  BaseSpecMatcher,
ASTMatchFinder *  Finder,
BoundNodesTreeBuilder *  Builder 
)

Definition at line 77 of file ASTMatchersInternal.cpp.

References Node, and clang::Result.

Referenced by clang::ast_matchers::AST_MATCHER_P().

◆ notUnaryOperator()

static bool clang::ast_matchers::internal::notUnaryOperator ( const DynTypedNode DynNode,
ASTMatchFinder *  Finder,
BoundNodesTreeBuilder *  Builder,
ArrayRef< DynTypedMatcher >  InnerMatchers 
)
static

Definition at line 366 of file ASTMatchersInternal.cpp.

◆ optionallyVariadicOperator()

static bool clang::ast_matchers::internal::optionallyVariadicOperator ( const DynTypedNode DynNode,
ASTMatchFinder *  Finder,
BoundNodesTreeBuilder *  Builder,
ArrayRef< DynTypedMatcher >  InnerMatchers 
)
static

Definition at line 431 of file ASTMatchersInternal.cpp.

References clang::Result.

◆ vectorFromRefs()

static std::vector< std::string > clang::ast_matchers::internal::vectorFromRefs ( ArrayRef< const StringRef * >  NameRefs)
inlinestatic