clang  13.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)
 
llvm::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 386 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 415 of file ASTMatchersInternal.cpp.

◆ consumeNameSuffix()

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

Definition at line 480 of file ASTMatchersInternal.cpp.

◆ createAndVerifyRegex()

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

Definition at line 709 of file ASTMatchersInternal.cpp.

References MatcherID.

◆ eachOfVariadicOperator()

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

Definition at line 398 of file ASTMatchersInternal.cpp.

◆ getExpansionLocOfMacro()

llvm::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 494 of file ASTMatchersInternal.cpp.

References Node.

◆ getNodeName() [2/3]

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

Definition at line 520 of file ASTMatchersInternal.cpp.

References Node.

◆ getNodeName() [3/3]

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

Definition at line 511 of file ASTMatchersInternal.cpp.

References Node.

◆ hasAnyNameFunc()

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

Definition at line 451 of file ASTMatchersInternal.cpp.

References vectorFromRefs().

◆ hasAnyOperatorNameFunc()

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

Definition at line 461 of file ASTMatchersInternal.cpp.

References vectorFromRefs().

◆ hasAnyOverloadedOperatorNameFunc()

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

Definition at line 466 of file ASTMatchersInternal.cpp.

References vectorFromRefs().

◆ hasAnySelectorFunc()

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

Definition at line 456 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

Definition at line 677 of file ASTMatchersInternal.cpp.

References clang::Lexer::getSpelling(), SM, and Text.

Referenced by getExpansionLocOfMacro().

◆ 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.

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 365 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 430 of file ASTMatchersInternal.cpp.

◆ vectorFromRefs()

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