clang
8.0.0
|
Go to the source code of this file.
Macros | |
#define | AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) |
AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) { ... More... | |
#define | AST_MATCHER_FUNCTION_P(ReturnType, DefineMatcher, ParamType, Param) |
AST_MATCHER_FUNCTION_P(ReturnType, DefineMatcher, ParamType, Param) { ... More... | |
#define | AST_MATCHER_FUNCTION_P_OVERLOAD(ReturnType, DefineMatcher, ParamType, Param, OverloadId) |
#define | AST_MATCHER(Type, DefineMatcher) |
AST_MATCHER(Type, DefineMatcher) { ... More... | |
#define | AST_MATCHER_P(Type, DefineMatcher, ParamType, Param) AST_MATCHER_P_OVERLOAD(Type, DefineMatcher, ParamType, Param, 0) |
AST_MATCHER_P(Type, DefineMatcher, ParamType, Param) { ... More... | |
#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) { ... More... | |
#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. More... | |
#define | AST_POLYMORPHIC_MATCHER(DefineMatcher, ReturnTypesF) |
AST_POLYMORPHIC_MATCHER(DefineMatcher) { ... More... | |
#define | AST_POLYMORPHIC_MATCHER_P(DefineMatcher, ReturnTypesF, ParamType, Param) |
AST_POLYMORPHIC_MATCHER_P(DefineMatcher, ParamType, Param) { ... More... | |
#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) { ... More... | |
#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. More... | |
#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 . More... | |
#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 95 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 56 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 75 of file ASTMatchersMacros.h.
#define AST_MATCHER_FUNCTION_P_OVERLOAD | ( | ReturnType, | |
DefineMatcher, | |||
ParamType, | |||
Param, | |||
OverloadId | |||
) |
Definition at line 78 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 129 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 176 of file ASTMatchersMacros.h.
#define AST_MATCHER_P2_OVERLOAD | ( | Type, | |
DefineMatcher, | |||
ParamType1, | |||
Param1, | |||
ParamType2, | |||
Param2, | |||
OverloadId | |||
) |
Definition at line 181 of file ASTMatchersMacros.h.
#define AST_MATCHER_P_OVERLOAD | ( | Type, | |
DefineMatcher, | |||
ParamType, | |||
Param, | |||
OverloadId | |||
) |
Definition at line 132 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 231 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 264 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 316 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER_P2_OVERLOAD | ( | DefineMatcher, | |
ReturnTypesF, | |||
ParamType1, | |||
Param1, | |||
ParamType2, | |||
Param2, | |||
OverloadId | |||
) |
Definition at line 321 of file ASTMatchersMacros.h.
#define AST_POLYMORPHIC_MATCHER_P_OVERLOAD | ( | DefineMatcher, | |
ReturnTypesF, | |||
ParamType, | |||
Param, | |||
OverloadId | |||
) |
Definition at line 269 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 222 of file ASTMatchersMacros.h.
Referenced by clang::ast_matchers::AST_MATCHER(), and clang::ast_matchers::AST_MATCHER_P().
#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 393 of file ASTMatchersMacros.h.
#define AST_TYPE_TRAVERSE_MATCHER_DECL | ( | MatcherName, | |
FunctionName, | |||
ReturnTypesF | |||
) |
Definition at line 365 of file ASTMatchersMacros.h.
#define AST_TYPE_TRAVERSE_MATCHER_DEF | ( | MatcherName, | |
ReturnTypesF | |||
) |
Definition at line 379 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 431 of file ASTMatchersMacros.h.
#define AST_TYPELOC_TRAVERSE_MATCHER_DECL | ( | MatcherName, | |
FunctionName, | |||
ReturnTypesF | |||
) |
Definition at line 405 of file ASTMatchersMacros.h.
#define AST_TYPELOC_TRAVERSE_MATCHER_DEF | ( | MatcherName, | |
ReturnTypesF | |||
) |
Definition at line 421 of file ASTMatchersMacros.h.