class MatcherDescriptor
Declaration
class MatcherDescriptor { /* full declaration omitted */ };
Description
Matcher descriptor interface. Provides a \c create() method that constructs the matcher from the provided arguments, and various other methods for type introspection.
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:304
Method Overview
- public virtual std::unique_ptr<MatcherDescriptor> buildMatcherCtor(clang::ast_matchers::dynamic::SourceRange NameRange, ArrayRef<clang::ast_matchers::dynamic::ParserValue> Args, clang::ast_matchers::dynamic::Diagnostics * Error) const
- public virtual 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 virtual void getArgKinds(clang::ASTNodeKind ThisKind, unsigned int ArgNo, std::vector<ArgKind> & ArgKinds) const
- public virtual unsigned int getNumArgs() const
- public virtual bool isBuilderMatcher() const
- public virtual bool isConvertibleTo(clang::ASTNodeKind Kind, unsigned int * Specificity = nullptr, clang::ASTNodeKind * LeastDerivedKind = nullptr) const
- public virtual bool isPolymorphic() const
- public virtual bool isVariadic() const
- public virtual clang::ASTNodeKind nodeMatcherType() const
- public virtual ~MatcherDescriptor()
Methods
¶virtual std::unique_ptr<MatcherDescriptor>
buildMatcherCtor(
clang::ast_matchers::dynamic::SourceRange
NameRange,
ArrayRef<
clang::ast_matchers::dynamic::ParserValue>
Args,
clang::ast_matchers::dynamic::Diagnostics*
Error) const
virtual std::unique_ptr<MatcherDescriptor>
buildMatcherCtor(
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:317
Parameters
- clang::ast_matchers::dynamic::SourceRange NameRange
- ArrayRef< clang::ast_matchers::dynamic::ParserValue> Args
- clang::ast_matchers::dynamic::Diagnostics* Error
¶virtual 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
virtual 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:308
Parameters
- clang::ast_matchers::dynamic::SourceRange NameRange
- ArrayRef< clang::ast_matchers::dynamic::ParserValue> Args
- clang::ast_matchers::dynamic::Diagnostics* Error
¶virtual void getArgKinds(
clang::ASTNodeKind ThisKind,
unsigned int ArgNo,
std::vector<ArgKind>& ArgKinds) const
virtual void getArgKinds(
clang::ASTNodeKind ThisKind,
unsigned int ArgNo,
std::vector<ArgKind>& ArgKinds) 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:333
Parameters
- clang::ASTNodeKind ThisKind
- unsigned int ArgNo
- std::vector<ArgKind>& ArgKinds
¶virtual unsigned int getNumArgs() const
virtual 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:327
¶virtual bool isBuilderMatcher() const
virtual bool isBuilderMatcher() const
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:314
¶virtual bool isConvertibleTo(
clang::ASTNodeKind Kind,
unsigned int* Specificity = nullptr,
clang::ASTNodeKind* LeastDerivedKind =
nullptr) const
virtual bool isConvertibleTo(
clang::ASTNodeKind Kind,
unsigned int* Specificity = nullptr,
clang::ASTNodeKind* LeastDerivedKind =
nullptr) 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:344
Parameters
- clang::ASTNodeKind Kind
- unsigned int* Specificity = nullptr
- clang::ASTNodeKind* LeastDerivedKind = nullptr
¶virtual bool isPolymorphic() const
virtual bool isPolymorphic() const
Description
Returns whether the matcher will, given a matcher of any type T, yield a matcher of type T.
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:349
¶virtual bool isVariadic() const
virtual 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:324
¶virtual clang::ASTNodeKind nodeMatcherType() const
virtual clang::ASTNodeKind nodeMatcherType() const
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:312
¶virtual ~MatcherDescriptor()
virtual ~MatcherDescriptor()
Declared at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:306