Recursive AST visitor that supports extension via dynamic dispatch. More...
#include "clang/AST/DynamicRecursiveASTVisitor.h"
template<
boolIsConst>
class clang::DynamicRecursiveASTVisitorBase< IsConst >
Recursive AST visitor that supports extension via dynamic dispatch.
Like RecursiveASTVisitor, this class allows for traversal of arbitrarily complex ASTs. The main difference is that this uses virtual functions instead of CRTP, which greatly improves compile times of Clang itself, as well as binary size.
Instead of functions (e.g. shouldVisitImplicitCode()), this class uses member variables (e.g. ShouldVisitImplicitCode) to control visitation behaviour.
However, there is no support for overriding some of the less commonly used features of the RAV, such as WalkUpFromX or attribute traversal (attributes can still be traversed, but you can't change what happens when we traverse one).
The following is a list of RAV features that are NOT customisable:
Furthermore, post-order traversal is not supported at all.
Prefer to use this over RecursiveASTVisitor unless you absolutely need to use one of the features listed above (e.g. overriding WalkUpFromX or post-order traversal).
Definition at line 55 of file DynamicRecursiveASTVisitor.h.
◆ MaybeConst ◆ DynamicRecursiveASTVisitorBase() [1/3] ◆ DynamicRecursiveASTVisitorBase() [2/3] ◆ DynamicRecursiveASTVisitorBase() [3/3] ◆ ~DynamicRecursiveASTVisitorBase() ◆ anchor() ◆ dataTraverseNode() ◆ dataTraverseStmtPost()Invoked after visiting a statement or expression via data recursion.
This is not invoked if the previously invoked dataTraverseStmtPre
returned false.
Definition at line 240 of file DynamicRecursiveASTVisitor.h.
◆ dataTraverseStmtPre()Invoked before visiting a statement or expression via data recursion.
Definition at line 233 of file DynamicRecursiveASTVisitor.h.
◆ operator=() [1/2] ◆ operator=() [2/2] ◆ TraverseAST()Recursively visits an entire AST, starting from the TranslationUnitDecl.
Recursively visit an attribute, by dispatching to Traverse*Attr() based on the argument's dynamic type.
Recursively visit a constructor initializer.
This automatically dispatches to another visitor for the initializer expression, but not for the name of the initializer, so may be overridden for clients that need access to the name.
Referenced by clang::Sema::DiagnoseImmediateEscalatingReason().
◆ TraverseCXXBaseSpecifier()Recursively visit a base specifier.
This can be overridden by a subclass.
Recursively visit a name with its location information.
Recursively visit a lambda capture.
Init
is the expression that will be used to initialize the capture.
Recursively visit a C++ nested-name-specifier.
Recursively visit a C++ nested-name-specifier with location information.
Recursively visit an Objective-C protocol reference with location information.
Recursively visit a template argument and dispatch to the appropriate method for the argument type.
Recursively visit a template argument location and dispatch to the appropriate method for the argument type.
Recursively visit a set of template arguments.
Recursively visit a template name and dispatch to the appropriate method.
Recursively visit a type, by dispatching to Traverse*Type() based on the argument's getTypeClass() property.
Traverse a concept (requirement).
◆ TraverseTypeLoc()Recursively visit a type with location, by dispatching to Traverse*TypeLoc() based on the argument type's getTypeClass() property.
The documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4