class RegexMatcherDescriptor
Declaration
template <typename ReturnType>
class RegexMatcherDescriptor : public MatcherDescriptor { /* full declaration omitted */ };
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:799
Inherits from: MatcherDescriptor
Templates
- ReturnType
Member Variables
- private ReturnType (*const)(llvm::StringRef, llvm::Regex::RegexFlags) WithFlags
- private ReturnType (*const)(llvm::StringRef) NoFlags
- private const std::vector<ASTNodeKind> RetKinds
Method Overview
- public RegexMatcherDescriptor<ReturnType>(ReturnType (*)(llvm::StringRef, llvm::Regex::RegexFlags) WithFlags, ReturnType (*)(llvm::StringRef) NoFlags, ArrayRef<clang::ASTNodeKind> RetKinds)
- public clang::ast_matchers::dynamic::VariantMatcher create(clang::ast_matchers::dynamic::SourceRange NameRange, ArrayRef<clang::ast_matchers::dynamic::ParserValue> Args, clang::ast_matchers::dynamic::Diagnostics * Error) const
- public void getArgKinds(clang::ASTNodeKind ThisKind, unsigned int ArgNo, std::vector<ArgKind> & Kinds) const
- public unsigned int getNumArgs() const
- public bool isConvertibleTo(clang::ASTNodeKind Kind, unsigned int * Specificity, clang::ASTNodeKind * LeastDerivedKind) const
- public bool isVariadic() const
Inherited from MatcherDescriptor:
- public buildMatcherCtor
- public create
- public getArgKinds
- public getNumArgs
- public isBuilderMatcher
- public isConvertibleTo
- public isPolymorphic
- public isVariadic
- public nodeMatcherType
Methods
¶RegexMatcherDescriptor<ReturnType>(
ReturnType (*)(llvm::StringRef,
llvm::Regex::RegexFlags)
WithFlags,
ReturnType (*)(llvm::StringRef) NoFlags,
ArrayRef<clang::ASTNodeKind> RetKinds)
RegexMatcherDescriptor<ReturnType>(
ReturnType (*)(llvm::StringRef,
llvm::Regex::RegexFlags)
WithFlags,
ReturnType (*)(llvm::StringRef) NoFlags,
ArrayRef<clang::ASTNodeKind> RetKinds)
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:801
Parameters
- ReturnType (*)(llvm::StringRef, llvm::Regex::RegexFlags) WithFlags
- ReturnType (*)(llvm::StringRef) NoFlags
- ArrayRef<clang::ASTNodeKind> RetKinds
¶clang::ast_matchers::dynamic::VariantMatcher
create(
clang::ast_matchers::dynamic::SourceRange
NameRange,
ArrayRef<
clang::ast_matchers::dynamic::ParserValue>
Args,
clang::ast_matchers::dynamic::Diagnostics*
Error) const
clang::ast_matchers::dynamic::VariantMatcher
create(
clang::ast_matchers::dynamic::SourceRange
NameRange,
ArrayRef<
clang::ast_matchers::dynamic::ParserValue>
Args,
clang::ast_matchers::dynamic::Diagnostics*
Error) const
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:822
Parameters
- clang::ast_matchers::dynamic::SourceRange NameRange
- ArrayRef< clang::ast_matchers::dynamic::ParserValue> Args
- clang::ast_matchers::dynamic::Diagnostics* Error
¶void getArgKinds(
clang::ASTNodeKind ThisKind,
unsigned int ArgNo,
std::vector<ArgKind>& Kinds) const
void getArgKinds(
clang::ASTNodeKind ThisKind,
unsigned int ArgNo,
std::vector<ArgKind>& Kinds) const
Description
Given that the matcher is being converted to type \p ThisKind, append the set of argument types accepted for argument \p ArgNo to \p ArgKinds.
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:810
Parameters
- clang::ASTNodeKind ThisKind
- unsigned int ArgNo
- std::vector<ArgKind>& Kinds
¶unsigned int getNumArgs() const
unsigned int getNumArgs() const
Description
Returns the number of arguments accepted by the matcher if not variadic.
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:808
¶bool isConvertibleTo(
clang::ASTNodeKind Kind,
unsigned int* Specificity,
clang::ASTNodeKind* LeastDerivedKind) const
bool isConvertibleTo(
clang::ASTNodeKind Kind,
unsigned int* Specificity,
clang::ASTNodeKind* LeastDerivedKind) const
Description
Returns whether this matcher is convertible to the given type. If it is so convertible, store in *Specificity a value corresponding to the "specificity" of the converted matcher to the given context, and in *LeastDerivedKind the least derived matcher kind which would result in the same matcher overload. Zero specificity indicates that this conversion would produce a trivial matcher that will either always or never match. Such matchers are excluded from code completion results.
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:816
Parameters
- clang::ASTNodeKind Kind
- unsigned int* Specificity
- clang::ASTNodeKind* LeastDerivedKind
¶bool isVariadic() const
bool isVariadic() const
Description
Returns whether the matcher is variadic. Variadic matchers can take any number of arguments, but they must be of the same type.
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:807