clang 20.0.0git
|
Go to the source code of this file.
Macros | |
#define | AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) |
AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) { ... } defines a zero parameter function named DefineMatcher() that returns a ReturnType object. | |
#define | AST_MATCHER_FUNCTION_P(ReturnType, DefineMatcher, ParamType, Param) |
AST_MATCHER_FUNCTION_P(ReturnType, DefineMatcher, ParamType, Param) { ... } defines a single-parameter function named DefineMatcher() that returns a ReturnType object. | |
#define | AST_MATCHER_FUNCTION_P_OVERLOAD(ReturnType, DefineMatcher, ParamType, Param, OverloadId) |
#define | AST_MATCHER(Type, DefineMatcher) |
AST_MATCHER(Type, DefineMatcher) { ... } defines a zero parameter function named DefineMatcher() that returns a Matcher<Type> object. | |
#define | AST_MATCHER_P(Type, DefineMatcher, ParamType, Param) AST_MATCHER_P_OVERLOAD(Type, DefineMatcher, ParamType, Param, 0) |
AST_MATCHER_P(Type, DefineMatcher, ParamType, Param) { ... } defines a single-parameter function named DefineMatcher() that returns a Matcher<Type> object. | |
#define | AST_MATCHER_P_OVERLOAD(Type, DefineMatcher, ParamType, Param, OverloadId) |
#define | AST_MATCHER_P2(Type, DefineMatcher, ParamType1, Param1, ParamType2, Param2) |
AST_MATCHER_P2(
Type, DefineMatcher, ParamType1, Param1, ParamType2, Param2) { ... } defines a two-parameter function named DefineMatcher() that returns a Matcher<Type> object. | |
#define | AST_MATCHER_P2_OVERLOAD(Type, DefineMatcher, ParamType1, Param1, ParamType2, Param2, OverloadId) |
#define | AST_POLYMORPHIC_SUPPORTED_TYPES(...) void(::clang::ast_matchers::internal::TypeList<__VA_ARGS__>) |
Construct a type-list to be passed to the AST_POLYMORPHIC_MATCHER* macros. | |
#define | AST_POLYMORPHIC_MATCHER(DefineMatcher, ReturnTypesF) |
AST_POLYMORPHIC_MATCHER(DefineMatcher) { ... } defines a single-parameter function named DefineMatcher() that is polymorphic in the return type. | |
#define | AST_POLYMORPHIC_MATCHER_P(DefineMatcher, ReturnTypesF, ParamType, Param) |
AST_POLYMORPHIC_MATCHER_P(DefineMatcher, ParamType, Param) { ... } defines a single-parameter function named DefineMatcher() that is polymorphic in the return type. | |
#define | AST_POLYMORPHIC_MATCHER_P_OVERLOAD(DefineMatcher, ReturnTypesF, ParamType, Param, OverloadId) |
#define | AST_POLYMORPHIC_MATCHER_P2(DefineMatcher, ReturnTypesF, ParamType1, Param1, ParamType2, Param2) |
AST_POLYMORPHIC_MATCHER_P2(
DefineMatcher, ParamType1, Param1, ParamType2, Param2) { ... } defines a two-parameter function named matcher() that is polymorphic in the return type. | |
#define | AST_POLYMORPHIC_MATCHER_P2_OVERLOAD(DefineMatcher, ReturnTypesF, ParamType1, Param1, ParamType2, Param2, OverloadId) |
#define | AST_TYPE_TRAVERSE_MATCHER_DECL(MatcherName, FunctionName, ReturnTypesF) |
#define | AST_TYPE_TRAVERSE_MATCHER_DEF(MatcherName, ReturnTypesF) |
#define | AST_TYPE_TRAVERSE_MATCHER(MatcherName, FunctionName, ReturnTypesF) |
AST_TYPE_TRAVERSE_MATCHER(MatcherName, FunctionName) defines the matcher MatcherName that can be used to traverse from one Type to another. | |
#define | AST_TYPELOC_TRAVERSE_MATCHER_DECL(MatcherName, FunctionName, ReturnTypesF) |
#define | AST_TYPELOC_TRAVERSE_MATCHER_DEF(MatcherName, ReturnTypesF) |
#define | AST_TYPELOC_TRAVERSE_MATCHER(MatcherName, FunctionName, ReturnTypesF) |
AST_TYPELOC_TRAVERSE_MATCHER(MatcherName, FunctionName) works identical to AST_TYPE_TRAVERSE_MATCHER but operates on TypeLocs . | |
#define | AST_MATCHER_REGEX(Type, DefineMatcher, Param) AST_MATCHER_REGEX_OVERLOAD(Type, DefineMatcher, Param, 0) |
AST_MATCHER_REGEX(Type, DefineMatcher, Param) { ... } defines a function named DefineMatcher() that takes a regular expression string paramater and an optional RegexFlags parameter and returns a Matcher<Type> object. | |
#define | AST_MATCHER_REGEX_OVERLOAD(Type, DefineMatcher, Param, OverloadId) |
#define | AST_POLYMORPHIC_MATCHER_REGEX(DefineMatcher, ReturnTypesF, Param) AST_POLYMORPHIC_MATCHER_REGEX_OVERLOAD(DefineMatcher, ReturnTypesF, Param, 0) |
AST_POLYMORPHIC_MATCHER_REGEX(DefineMatcher, ReturnTypesF, Param) { ... } defines a function named DefineMatcher() that takes a regular expression string paramater and an optional RegexFlags parameter that is polymorphic in the return type. | |
#define | AST_POLYMORPHIC_MATCHER_REGEX_OVERLOAD(DefineMatcher, ReturnTypesF, Param, OverloadId) |
#define AST_MATCHER | ( | Type, | |
DefineMatcher | |||
) |
AST_MATCHER(Type, DefineMatcher) { ... } defines a zero parameter function named DefineMatcher() that returns a Matcher<Type> object.
The code between the curly braces has access to the following variables:
Node: the AST node being matched; its type is Type. Finder: an ASTMatchFinder*. Builder: a BoundNodesTreeBuilder*.
The code should return true if 'Node' matches.
Definition at line 94 of file ASTMatchersMacros.h.
#define AST_MATCHER_FUNCTION | ( | ReturnType, | |
DefineMatcher | |||
) |
AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) { ... } defines a zero parameter function named DefineMatcher() that returns a ReturnType object.
Definition at line 55 of file ASTMatchersMacros.h.
#define AST_MATCHER_FUNCTION_P | ( | ReturnType, | |
DefineMatcher, | |||
ParamType, | |||
Param | |||
) |
AST_MATCHER_FUNCTION_P(ReturnType, DefineMatcher, ParamType, Param) { ... } defines a single-parameter function named DefineMatcher() that returns a ReturnType object.
The code between the curly braces has access to the following variables:
Param: the parameter passed to the function; its type is ParamType.
The code should return an instance of ReturnType.
Definition at line 74 of file ASTMatchersMacros.h.
#define AST_MATCHER_FUNCTION_P_OVERLOAD | ( | ReturnType, | |
DefineMatcher, | |||
ParamType, | |||
Param, | |||
OverloadId | |||
) |
Definition at line 77 of file ASTMatchersMacros.h.
#define AST_MATCHER_P | ( | Type, | |
DefineMatcher, | |||
ParamType, | |||
Param | |||
) | AST_MATCHER_P_OVERLOAD(Type, DefineMatcher, ParamType, Param, 0) |
AST_MATCHER_P(Type, DefineMatcher, ParamType, Param) { ... } defines a single-parameter function named DefineMatcher() that returns a Matcher<Type> object.
The code between the curly braces has access to the following variables:
Node: the AST node being matched; its type is Type. Param: the parameter passed to the function; its type is ParamType. Finder: an ASTMatchFinder*. Builder: a BoundNodesTreeBuilder*.
The code should return true if 'Node' matches.
Definition at line 128 of file ASTMatchersMacros.h.
#define AST_MATCHER_P2 | ( | Type, | |
DefineMatcher, | |||
ParamType1, | |||
Param1, | |||
ParamType2, | |||
Param2 | |||
) |
AST_MATCHER_P2( Type, DefineMatcher, ParamType1, Param1, ParamType2, Param2) { ... } defines a two-parameter function named DefineMatcher() that returns a Matcher<Type> object.
The code between the curly braces has access to the following variables:
Node: the AST node being matched; its type is Type. Param1, Param2: the parameters passed to the function; their types are ParamType1 and ParamType2. Finder: an ASTMatchFinder*. Builder: a BoundNodesTreeBuilder*.
The code should return true if 'Node' matches.
Definition at line 175 of file ASTMatchersMacros.h.
#define AST_MATCHER_P2_OVERLOAD | ( | Type, | |
DefineMatcher, | |||
ParamType1, | |||
Param1, | |||
ParamType2, | |||
Param2, | |||
OverloadId | |||
) |
Definition at line 180 of file ASTMatchersMacros.h.
#define AST_MATCHER_P_OVERLOAD | ( | Type, | |
DefineMatcher, | |||
ParamType, | |||
Param, | |||
OverloadId | |||
) |
Definition at line 131 of file ASTMatchersMacros.h.
#define AST_MATCHER_REGEX | ( | Type, | |
DefineMatcher, | |||
Param | |||
) | AST_MATCHER_REGEX_OVERLOAD(Type, DefineMatcher, Param, 0) |
AST_MATCHER_REGEX(Type, DefineMatcher, Param) { ... } defines a function named DefineMatcher() that takes a regular expression string paramater and an optional RegexFlags parameter and returns a Matcher<Type> object.
The code between the curly braces has access to the following variables:
Node: the AST node being matched; its type is Type. Param: a pointer to an llvm::Regex object Finder: an ASTMatchFinder*. Builder: a BoundNodesTreeBuilder*.
The code should return true if 'Node' matches.
Definition at line 455 of file ASTMatchersMacros.h.
#define AST_MATCHER_REGEX_OVERLOAD | ( | Type, | |
DefineMatcher, | |||
Param, | |||
OverloadId | |||
) |
Definition at line 458 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER | ( | DefineMatcher, | |
ReturnTypesF | |||
) |
AST_POLYMORPHIC_MATCHER(DefineMatcher) { ... } defines a single-parameter function named DefineMatcher() that is polymorphic in the return type.
The variables are the same as for AST_MATCHER, but NodeType will be deduced from the calling context.
Definition at line 230 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER_P | ( | DefineMatcher, | |
ReturnTypesF, | |||
ParamType, | |||
Param | |||
) |
AST_POLYMORPHIC_MATCHER_P(DefineMatcher, ParamType, Param) { ... } defines a single-parameter function named DefineMatcher() that is polymorphic in the return type.
The variables are the same as for AST_MATCHER_P, with the addition of NodeType, which specifies the node type of the matcher Matcher<NodeType> returned by the function matcher().
FIXME: Pull out common code with above macro?
Definition at line 263 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER_P2 | ( | DefineMatcher, | |
ReturnTypesF, | |||
ParamType1, | |||
Param1, | |||
ParamType2, | |||
Param2 | |||
) |
AST_POLYMORPHIC_MATCHER_P2( DefineMatcher, ParamType1, Param1, ParamType2, Param2) { ... } defines a two-parameter function named matcher() that is polymorphic in the return type.
The variables are the same as for AST_MATCHER_P2, with the addition of NodeType, which specifies the node type of the matcher Matcher<NodeType> returned by the function DefineMatcher().
Definition at line 314 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER_P2_OVERLOAD | ( | DefineMatcher, | |
ReturnTypesF, | |||
ParamType1, | |||
Param1, | |||
ParamType2, | |||
Param2, | |||
OverloadId | |||
) |
Definition at line 319 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER_P_OVERLOAD | ( | DefineMatcher, | |
ReturnTypesF, | |||
ParamType, | |||
Param, | |||
OverloadId | |||
) |
Definition at line 268 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER_REGEX | ( | DefineMatcher, | |
ReturnTypesF, | |||
Param | |||
) | AST_POLYMORPHIC_MATCHER_REGEX_OVERLOAD(DefineMatcher, ReturnTypesF, Param, 0) |
AST_POLYMORPHIC_MATCHER_REGEX(DefineMatcher, ReturnTypesF, Param) { ... } defines a function named DefineMatcher() that takes a regular expression string paramater and an optional RegexFlags parameter that is polymorphic in the return type.
The variables are the same as for AST_MATCHER_REGEX, with the addition of NodeType, which specifies the node type of the matcher Matcher<NodeType> returned by the function matcher().
Definition at line 505 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER_REGEX_OVERLOAD | ( | DefineMatcher, | |
ReturnTypesF, | |||
Param, | |||
OverloadId | |||
) |
Definition at line 508 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_SUPPORTED_TYPES | ( | ... | ) | void(::clang::ast_matchers::internal::TypeList<__VA_ARGS__>) |
Construct a type-list to be passed to the AST_POLYMORPHIC_MATCHER* macros.
You can't pass something like TypeList<Foo, Bar>
to a macro, because it will look at that as two arguments. However, you can pass void(TypeList<Foo, Bar>)
, which works thanks to the parenthesis. The PolymorphicMatcherWithParam*
classes will unpack the function type to extract the TypeList object.
Definition at line 221 of file ASTMatchersMacros.h.
#define AST_TYPE_TRAVERSE_MATCHER | ( | MatcherName, | |
FunctionName, | |||
ReturnTypesF | |||
) |
AST_TYPE_TRAVERSE_MATCHER(MatcherName, FunctionName) defines the matcher MatcherName
that can be used to traverse from one Type
to another.
For a specific SpecificType
, the traversal is done using SpecificType::FunctionName
. The existence of such a function determines whether a corresponding matcher can be used on SpecificType
.
Definition at line 391 of file ASTMatchersMacros.h.
#define AST_TYPE_TRAVERSE_MATCHER_DECL | ( | MatcherName, | |
FunctionName, | |||
ReturnTypesF | |||
) |
Definition at line 363 of file ASTMatchersMacros.h.
#define AST_TYPE_TRAVERSE_MATCHER_DEF | ( | MatcherName, | |
ReturnTypesF | |||
) |
Definition at line 377 of file ASTMatchersMacros.h.
#define AST_TYPELOC_TRAVERSE_MATCHER | ( | MatcherName, | |
FunctionName, | |||
ReturnTypesF | |||
) |
AST_TYPELOC_TRAVERSE_MATCHER(MatcherName, FunctionName) works identical to AST_TYPE_TRAVERSE_MATCHER
but operates on TypeLocs
.
Definition at line 429 of file ASTMatchersMacros.h.
#define AST_TYPELOC_TRAVERSE_MATCHER_DECL | ( | MatcherName, | |
FunctionName, | |||
ReturnTypesF | |||
) |
Definition at line 403 of file ASTMatchersMacros.h.
#define AST_TYPELOC_TRAVERSE_MATCHER_DEF | ( | MatcherName, | |
ReturnTypesF | |||
) |
Definition at line 419 of file ASTMatchersMacros.h.