clang API Documentation
A class that does preorder depth-first traversal on the entire Clang AST and visits each node. More...
#include <DataRecursiveASTVisitor.h>
Classes | |
struct | EnqueueJob |
class | NewQueueRAII |
class | StmtQueueAction |
Public Member Functions | |
Derived & | getDerived () |
Return a reference to the derived class. | |
bool | shouldVisitTemplateInstantiations () const |
Return whether this visitor should recurse into template instantiations. | |
bool | shouldWalkTypesOfTypeLocs () const |
Return whether this visitor should recurse into the types of TypeLocs. | |
bool | TraverseStmt (Stmt *S) |
Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dynamic type. | |
bool | TraverseType (QualType T) |
Recursively visit a type, by dispatching to Traverse*Type() based on the argument's getTypeClass() property. | |
bool | TraverseTypeLoc (TypeLoc TL) |
Recursively visit a type with location, by dispatching to Traverse*TypeLoc() based on the argument type's getTypeClass() property. | |
bool | TraverseAttr (Attr *At) |
Recursively visit an attribute, by dispatching to Traverse*Attr() based on the argument's dynamic type. | |
bool | TraverseDecl (Decl *D) |
Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic type. | |
bool | TraverseNestedNameSpecifier (NestedNameSpecifier *NNS) |
Recursively visit a C++ nested-name-specifier. | |
bool | TraverseNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS) |
Recursively visit a C++ nested-name-specifier with location information. | |
bool | TraverseDeclarationNameInfo (DeclarationNameInfo NameInfo) |
Recursively visit a name with its location information. | |
bool | TraverseTemplateName (TemplateName Template) |
Recursively visit a template name and dispatch to the appropriate method. | |
bool | TraverseTemplateArgument (const TemplateArgument &Arg) |
Recursively visit a template argument and dispatch to the appropriate method for the argument type. | |
bool | TraverseTemplateArgumentLoc (const TemplateArgumentLoc &ArgLoc) |
Recursively visit a template argument location and dispatch to the appropriate method for the argument type. | |
bool | TraverseTemplateArguments (const TemplateArgument *Args, unsigned NumArgs) |
Recursively visit a set of template arguments. This can be overridden by a subclass, but it's not expected that will be needed -- this visitor always dispatches to another. | |
bool | TraverseConstructorInitializer (CXXCtorInitializer *Init) |
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. | |
bool | TraverseLambdaCapture (LambdaExpr *LE, const LambdaCapture *C) |
Recursively visit a lambda capture. | |
bool | TraverseLambdaBody (LambdaExpr *LE) |
Recursively visit the body of a lambda expression. | |
bool | VisitAttr (Attr *A) |
bool | WalkUpFromStmt (Stmt *S) |
bool | VisitStmt (Stmt *S) |
bool | WalkUpFromType (Type *T) |
bool | VisitType (Type *T) |
bool | WalkUpFromTypeLoc (TypeLoc TL) |
bool | VisitTypeLoc (TypeLoc TL) |
bool | WalkUpFromQualifiedTypeLoc (QualifiedTypeLoc TL) |
bool | VisitQualifiedTypeLoc (QualifiedTypeLoc TL) |
bool | WalkUpFromUnqualTypeLoc (UnqualTypeLoc TL) |
bool | VisitUnqualTypeLoc (UnqualTypeLoc TL) |
bool | WalkUpFromDecl (Decl *D) |
bool | VisitDecl (Decl *D) |
Derived & | getDerived () |
Return a reference to the derived class. | |
bool | shouldVisitTemplateInstantiations () const |
Return whether this visitor should recurse into template instantiations. | |
bool | shouldWalkTypesOfTypeLocs () const |
Return whether this visitor should recurse into the types of TypeLocs. | |
bool | shouldVisitImplicitCode () const |
Return whether this visitor should recurse into implicit code, e.g., implicit constructors and destructors. | |
bool | shouldUseDataRecursionFor (Stmt *S) const |
Return whether. | |
bool | TraverseStmt (Stmt *S) |
Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dynamic type. | |
bool | TraverseType (QualType T) |
Recursively visit a type, by dispatching to Traverse*Type() based on the argument's getTypeClass() property. | |
bool | TraverseTypeLoc (TypeLoc TL) |
Recursively visit a type with location, by dispatching to Traverse*TypeLoc() based on the argument type's getTypeClass() property. | |
bool | TraverseAttr (Attr *At) |
Recursively visit an attribute, by dispatching to Traverse*Attr() based on the argument's dynamic type. | |
bool | TraverseDecl (Decl *D) |
Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic type. | |
bool | TraverseNestedNameSpecifier (NestedNameSpecifier *NNS) |
Recursively visit a C++ nested-name-specifier. | |
bool | TraverseNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS) |
Recursively visit a C++ nested-name-specifier with location information. | |
bool | TraverseDeclarationNameInfo (DeclarationNameInfo NameInfo) |
Recursively visit a name with its location information. | |
bool | TraverseTemplateName (TemplateName Template) |
Recursively visit a template name and dispatch to the appropriate method. | |
bool | TraverseTemplateArgument (const TemplateArgument &Arg) |
Recursively visit a template argument and dispatch to the appropriate method for the argument type. | |
bool | TraverseTemplateArgumentLoc (const TemplateArgumentLoc &ArgLoc) |
Recursively visit a template argument location and dispatch to the appropriate method for the argument type. | |
bool | TraverseTemplateArguments (const TemplateArgument *Args, unsigned NumArgs) |
Recursively visit a set of template arguments. This can be overridden by a subclass, but it's not expected that will be needed -- this visitor always dispatches to another. | |
bool | TraverseConstructorInitializer (CXXCtorInitializer *Init) |
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. | |
bool | TraverseLambdaCapture (LambdaExpr *LE, const LambdaCapture *C) |
Recursively visit a lambda capture. | |
bool | TraverseLambdaBody (LambdaExpr *LE) |
Recursively visit the body of a lambda expression. | |
bool | VisitAttr (Attr *A) |
bool | WalkUpFromStmt (Stmt *S) |
bool | VisitStmt (Stmt *S) |
bool | WalkUpFromType (Type *T) |
bool | VisitType (Type *T) |
bool | WalkUpFromTypeLoc (TypeLoc TL) |
bool | VisitTypeLoc (TypeLoc TL) |
bool | WalkUpFromQualifiedTypeLoc (QualifiedTypeLoc TL) |
bool | VisitQualifiedTypeLoc (QualifiedTypeLoc TL) |
bool | WalkUpFromUnqualTypeLoc (UnqualTypeLoc TL) |
bool | VisitUnqualTypeLoc (UnqualTypeLoc TL) |
bool | WalkUpFromDecl (Decl *D) |
bool | VisitDecl (Decl *D) |
A class that does preorder depth-first traversal on the entire Clang AST and visits each node.
This class performs three distinct tasks: 1. traverse the AST (i.e. go to each node); 2. at a given node, walk up the class hierarchy, starting from the node's dynamic type, until the top-most class (e.g. Stmt, Decl, or Type) is reached. 3. given a (node, class) combination, where 'class' is some base class of the dynamic type of 'node', call a user-overridable function to actually visit the node.
These tasks are done by three groups of methods, respectively: 1. TraverseDecl(Decl *x) does task #1. It is the entry point for traversing an AST rooted at x. This method simply dispatches (i.e. forwards) to TraverseFoo(Foo *x) where Foo is the dynamic type of *x, which calls WalkUpFromFoo(x) and then recursively visits the child nodes of x. TraverseStmt(Stmt *x) and TraverseType(QualType x) work similarly. 2. WalkUpFromFoo(Foo *x) does task #2. It does not try to visit any child node of x. Instead, it first calls WalkUpFromBar(x) where Bar is the direct parent class of Foo (unless Foo has no parent), and then calls VisitFoo(x) (see the next list item). 3. VisitFoo(Foo *x) does task #3.
These three method groups are tiered (Traverse* > WalkUpFrom* > Visit*). A method (e.g. Traverse*) may call methods from the same tier (e.g. other Traverse*) or one tier lower (e.g. WalkUpFrom*). It may not call methods from a higher tier.
Note that since WalkUpFromFoo() calls WalkUpFromBar() (where Bar is Foo's super class) before calling VisitFoo(), the result is that the Visit*() methods for a given node are called in the top-down order (e.g. for a node of type NamespaceDecl, the order will be VisitDecl(), VisitNamedDecl(), and then VisitNamespaceDecl()).
This scheme guarantees that all Visit*() calls for the same AST node are grouped together. In other words, Visit*() methods for different nodes are never interleaved.
Stmts are traversed internally using a data queue to avoid a stack overflow with hugely nested ASTs.
Clients of this visitor should subclass the visitor (providing themselves as the template argument, using the curiously recurring template pattern) and override any of the Traverse*, WalkUpFrom*, and Visit* methods for declarations, types, statements, expressions, or other AST nodes where the visitor should customize behavior. Most users only need to override Visit*. Advanced users may override Traverse* and WalkUpFrom* to implement custom traversal strategies. Returning false from one of these overridden functions will abort the entire traversal.
By default, this visitor tries to visit every part of the explicit source code exactly once. The default policy towards templates is to descend into the 'pattern' class or function body, not any explicit or implicit instantiations. Explicit specializations are still visited, and the patterns of partial specializations are visited separately. This behavior can be changed by overriding shouldVisitTemplateInstantiations() in the derived class to return true, in which case all known implicit and explicit instantiations will be visited at the same time as the pattern from which they were produced.
This class performs three distinct tasks: 1. traverse the AST (i.e. go to each node); 2. at a given node, walk up the class hierarchy, starting from the node's dynamic type, until the top-most class (e.g. Stmt, Decl, or Type) is reached. 3. given a (node, class) combination, where 'class' is some base class of the dynamic type of 'node', call a user-overridable function to actually visit the node.
These tasks are done by three groups of methods, respectively: 1. TraverseDecl(Decl *x) does task #1. It is the entry point for traversing an AST rooted at x. This method simply dispatches (i.e. forwards) to TraverseFoo(Foo *x) where Foo is the dynamic type of *x, which calls WalkUpFromFoo(x) and then recursively visits the child nodes of x. TraverseStmt(Stmt *x) and TraverseType(QualType x) work similarly. 2. WalkUpFromFoo(Foo *x) does task #2. It does not try to visit any child node of x. Instead, it first calls WalkUpFromBar(x) where Bar is the direct parent class of Foo (unless Foo has no parent), and then calls VisitFoo(x) (see the next list item). 3. VisitFoo(Foo *x) does task #3.
These three method groups are tiered (Traverse* > WalkUpFrom* > Visit*). A method (e.g. Traverse*) may call methods from the same tier (e.g. other Traverse*) or one tier lower (e.g. WalkUpFrom*). It may not call methods from a higher tier.
Note that since WalkUpFromFoo() calls WalkUpFromBar() (where Bar is Foo's super class) before calling VisitFoo(), the result is that the Visit*() methods for a given node are called in the top-down order (e.g. for a node of type NamespaceDecl, the order will be VisitDecl(), VisitNamedDecl(), and then VisitNamespaceDecl()).
This scheme guarantees that all Visit*() calls for the same AST node are grouped together. In other words, Visit*() methods for different nodes are never interleaved.
Clients of this visitor should subclass the visitor (providing themselves as the template argument, using the curiously recurring template pattern) and override any of the Traverse*, WalkUpFrom*, and Visit* methods for declarations, types, statements, expressions, or other AST nodes where the visitor should customize behavior. Most users only need to override Visit*. Advanced users may override Traverse* and WalkUpFrom* to implement custom traversal strategies. Returning false from one of these overridden functions will abort the entire traversal.
By default, this visitor tries to visit every part of the explicit source code exactly once. The default policy towards templates is to descend into the 'pattern' class or function body, not any explicit or implicit instantiations. Explicit specializations are still visited, and the patterns of partial specializations are visited separately. This behavior can be changed by overriding shouldVisitTemplateInstantiations() in the derived class to return true, in which case all known implicit and explicit instantiations will be visited at the same time as the pattern from which they were produced.
Definition at line 140 of file DataRecursiveASTVisitor.h.
Derived& clang::RecursiveASTVisitor< Derived >::getDerived | ( | ) | [inline] |
Return a reference to the derived class.
Definition at line 136 of file RecursiveASTVisitor.h.
Derived& clang::RecursiveASTVisitor< Derived >::getDerived | ( | ) | [inline] |
Return a reference to the derived class.
Definition at line 143 of file DataRecursiveASTVisitor.h.
Referenced by clang::RecursiveASTVisitor< FindSuperCallVisitor >::WalkUpFromDecl(), clang::RecursiveASTVisitor< FindSuperCallVisitor >::WalkUpFromQualifiedTypeLoc(), clang::RecursiveASTVisitor< FindSuperCallVisitor >::WalkUpFromStmt(), clang::RecursiveASTVisitor< FindSuperCallVisitor >::WalkUpFromType(), clang::RecursiveASTVisitor< FindSuperCallVisitor >::WalkUpFromTypeLoc(), and clang::RecursiveASTVisitor< FindSuperCallVisitor >::WalkUpFromUnqualTypeLoc().
bool clang::RecursiveASTVisitor< Derived >::shouldUseDataRecursionFor | ( | Stmt * | S | ) | const [inline] |
Return whether.
S | should be traversed using data recursion to avoid a stack overflow with extreme cases. |
Definition at line 152 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::shouldVisitImplicitCode | ( | ) | const [inline] |
Return whether this visitor should recurse into implicit code, e.g., implicit constructors and destructors.
Definition at line 148 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::shouldVisitTemplateInstantiations | ( | ) | const [inline] |
Return whether this visitor should recurse into template instantiations.
Definition at line 140 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::shouldVisitTemplateInstantiations | ( | ) | const [inline] |
Return whether this visitor should recurse into template instantiations.
Definition at line 147 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::shouldWalkTypesOfTypeLocs | ( | ) | const [inline] |
Return whether this visitor should recurse into the types of TypeLocs.
Reimplemented in clang::CallGraph.
Definition at line 144 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::shouldWalkTypesOfTypeLocs | ( | ) | const [inline] |
Return whether this visitor should recurse into the types of TypeLocs.
Reimplemented in clang::CallGraph.
Definition at line 151 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::TraverseAttr | ( | Attr * | At | ) |
Recursively visit an attribute, by dispatching to Traverse*Attr() based on the argument's dynamic type.
bool clang::RecursiveASTVisitor< Derived >::TraverseAttr | ( | Attr * | At | ) |
Recursively visit an attribute, by dispatching to Traverse*Attr() based on the argument's dynamic type.
bool clang::RecursiveASTVisitor< Derived >::TraverseConstructorInitializer | ( | CXXCtorInitializer * | Init | ) |
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.
Definition at line 780 of file DataRecursiveASTVisitor.h.
References clang::CXXCtorInitializer::getInit(), clang::CXXCtorInitializer::getTypeSourceInfo(), clang::CXXCtorInitializer::isWritten(), and TRY_TO.
bool clang::RecursiveASTVisitor< Derived >::TraverseConstructorInitializer | ( | CXXCtorInitializer * | Init | ) |
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.
bool clang::RecursiveASTVisitor< Derived >::TraverseDecl | ( | Decl * | D | ) |
Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic type.
Definition at line 583 of file DataRecursiveASTVisitor.h.
References clang::Decl::attrs(), clang::Decl::getKind(), and clang::Decl::isImplicit().
bool clang::RecursiveASTVisitor< Derived >::TraverseDecl | ( | Decl * | D | ) |
Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic type.
bool clang::RecursiveASTVisitor< Derived >::TraverseDeclarationNameInfo | ( | DeclarationNameInfo | NameInfo | ) |
Recursively visit a name with its location information.
Definition at line 665 of file DataRecursiveASTVisitor.h.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationNameInfo::getName(), clang::DeclarationNameInfo::getNamedTypeInfo(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, and TRY_TO.
bool clang::RecursiveASTVisitor< Derived >::TraverseDeclarationNameInfo | ( | DeclarationNameInfo | NameInfo | ) |
Recursively visit a name with its location information.
bool clang::RecursiveASTVisitor< Derived >::TraverseLambdaBody | ( | LambdaExpr * | LE | ) |
Recursively visit the body of a lambda expression.
This provides a hook for visitors that need more context when visiting LE->getBody()
.
Definition at line 800 of file DataRecursiveASTVisitor.h.
References clang::LambdaExpr::getBody(), and clang::RecursiveASTVisitor< Derived >::StmtQueueAction::queue().
bool clang::RecursiveASTVisitor< Derived >::TraverseLambdaBody | ( | LambdaExpr * | LE | ) |
Recursively visit the body of a lambda expression.
This provides a hook for visitors that need more context when visiting LE->getBody()
.
bool clang::RecursiveASTVisitor< Derived >::TraverseLambdaCapture | ( | LambdaExpr * | LE, |
const LambdaCapture * | C | ||
) |
Recursively visit a lambda capture.
Definition at line 792 of file DataRecursiveASTVisitor.h.
References clang::LambdaCapture::getCapturedVar(), clang::LambdaCapture::isInitCapture(), and TRY_TO.
bool clang::RecursiveASTVisitor< Derived >::TraverseLambdaCapture | ( | LambdaExpr * | LE, |
const LambdaCapture * | C | ||
) |
Recursively visit a lambda capture.
bool clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifier | ( | NestedNameSpecifier * | NNS | ) |
Recursively visit a C++ nested-name-specifier.
Definition at line 614 of file DataRecursiveASTVisitor.h.
References clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, TRY_TO, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
bool clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifier | ( | NestedNameSpecifier * | NNS | ) |
Recursively visit a C++ nested-name-specifier.
bool clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc | ( | NestedNameSpecifierLoc | NNS | ) |
Recursively visit a C++ nested-name-specifier with location information.
Definition at line 639 of file DataRecursiveASTVisitor.h.
References clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), clang::NestedNameSpecifierLoc::getPrefix(), clang::NestedNameSpecifierLoc::getTypeLoc(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, TRY_TO, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
bool clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc | ( | NestedNameSpecifierLoc | NNS | ) |
Recursively visit a C++ nested-name-specifier with location information.
bool clang::RecursiveASTVisitor< Derived >::TraverseStmt | ( | Stmt * | S | ) |
Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dynamic type.
Reimplemented in clang::arcmt::trans::BodyTransform< BODY_TRANS >, and clang::CallGraph.
Definition at line 470 of file DataRecursiveASTVisitor.h.
References BINOP_LIST, CAO_LIST, clang::Stmt::getStmtClass(), clang::Stmt::NoStmtClass, and UNARYOP_LIST.
bool clang::RecursiveASTVisitor< Derived >::TraverseStmt | ( | Stmt * | S | ) |
Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dynamic type.
Reimplemented in clang::arcmt::trans::BodyTransform< BODY_TRANS >, and clang::CallGraph.
bool clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument | ( | const TemplateArgument & | Arg | ) |
Recursively visit a template argument and dispatch to the appropriate method for the argument type.
Definition at line 700 of file DataRecursiveASTVisitor.h.
References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
bool clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument | ( | const TemplateArgument & | Arg | ) |
Recursively visit a template argument and dispatch to the appropriate method for the argument type.
bool clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgumentLoc | ( | const TemplateArgumentLoc & | ArgLoc | ) |
Recursively visit a template argument location and dispatch to the appropriate method for the argument type.
Definition at line 731 of file DataRecursiveASTVisitor.h.
References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgumentLoc::getSourceExpression(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, TRY_TO, and clang::TemplateArgument::Type.
bool clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgumentLoc | ( | const TemplateArgumentLoc & | ArgLoc | ) |
Recursively visit a template argument location and dispatch to the appropriate method for the argument type.
bool clang::RecursiveASTVisitor< Derived >::TraverseTemplateArguments | ( | const TemplateArgument * | Args, |
unsigned | NumArgs | ||
) |
Recursively visit a set of template arguments. This can be overridden by a subclass, but it's not expected that will be needed -- this visitor always dispatches to another.
Definition at line 770 of file DataRecursiveASTVisitor.h.
References TRY_TO.
bool clang::RecursiveASTVisitor< Derived >::TraverseTemplateArguments | ( | const TemplateArgument * | Args, |
unsigned | NumArgs | ||
) |
Recursively visit a set of template arguments. This can be overridden by a subclass, but it's not expected that will be needed -- this visitor always dispatches to another.
bool clang::RecursiveASTVisitor< Derived >::TraverseTemplateName | ( | TemplateName | Template | ) |
Recursively visit a template name and dispatch to the appropriate method.
Definition at line 690 of file DataRecursiveASTVisitor.h.
References clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsQualifiedTemplateName(), and TRY_TO.
bool clang::RecursiveASTVisitor< Derived >::TraverseTemplateName | ( | TemplateName | Template | ) |
Recursively visit a template name and dispatch to the appropriate method.
bool clang::RecursiveASTVisitor< Derived >::TraverseType | ( | QualType | T | ) |
Recursively visit a type, by dispatching to Traverse*Type() based on the argument's getTypeClass() property.
Definition at line 546 of file DataRecursiveASTVisitor.h.
References clang::Type::getTypeClass(), and clang::QualType::isNull().
bool clang::RecursiveASTVisitor< Derived >::TraverseType | ( | QualType | T | ) |
Recursively visit a type, by dispatching to Traverse*Type() based on the argument's getTypeClass() property.
bool clang::RecursiveASTVisitor< Derived >::TraverseTypeLoc | ( | TypeLoc | TL | ) |
Recursively visit a type with location, by dispatching to Traverse*TypeLoc() based on the argument type's getTypeClass() property.
Definition at line 562 of file DataRecursiveASTVisitor.h.
References clang::TypeLoc::getTypeLocClass(), and clang::TypeLoc::isNull().
bool clang::RecursiveASTVisitor< Derived >::TraverseTypeLoc | ( | TypeLoc | TL | ) |
Recursively visit a type with location, by dispatching to Traverse*TypeLoc() based on the argument type's getTypeClass() property.
bool clang::RecursiveASTVisitor< Derived >::VisitAttr | ( | Attr * | A | ) | [inline] |
Definition at line 256 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitAttr | ( | Attr * | A | ) | [inline] |
Definition at line 260 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitDecl | ( | Decl * | D | ) | [inline] |
Definition at line 401 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitDecl | ( | Decl * | D | ) | [inline] |
Definition at line 403 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitQualifiedTypeLoc | ( | QualifiedTypeLoc | TL | ) | [inline] |
Definition at line 375 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitQualifiedTypeLoc | ( | QualifiedTypeLoc | TL | ) | [inline] |
Definition at line 377 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitStmt | ( | Stmt * | S | ) | [inline] |
Definition at line 273 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitStmt | ( | Stmt * | S | ) | [inline] |
Definition at line 277 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitType | ( | Type * | T | ) | [inline] |
Definition at line 347 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitType | ( | Type * | T | ) | [inline] |
Definition at line 349 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitTypeLoc | ( | TypeLoc | TL | ) | [inline] |
Definition at line 368 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitTypeLoc | ( | TypeLoc | TL | ) | [inline] |
Definition at line 370 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitUnqualTypeLoc | ( | UnqualTypeLoc | TL | ) | [inline] |
Definition at line 379 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::VisitUnqualTypeLoc | ( | UnqualTypeLoc | TL | ) | [inline] |
Definition at line 381 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromDecl | ( | Decl * | D | ) | [inline] |
Definition at line 400 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromDecl | ( | Decl * | D | ) | [inline] |
Definition at line 402 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromQualifiedTypeLoc | ( | QualifiedTypeLoc | TL | ) | [inline] |
Definition at line 372 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromQualifiedTypeLoc | ( | QualifiedTypeLoc | TL | ) | [inline] |
Definition at line 374 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromStmt | ( | Stmt * | S | ) | [inline] |
Definition at line 272 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromStmt | ( | Stmt * | S | ) | [inline] |
Definition at line 276 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromType | ( | Type * | T | ) | [inline] |
Definition at line 346 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromType | ( | Type * | T | ) | [inline] |
Definition at line 348 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromTypeLoc | ( | TypeLoc | TL | ) | [inline] |
Definition at line 367 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromTypeLoc | ( | TypeLoc | TL | ) | [inline] |
Definition at line 369 of file RecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromUnqualTypeLoc | ( | UnqualTypeLoc | TL | ) | [inline] |
Definition at line 376 of file DataRecursiveASTVisitor.h.
bool clang::RecursiveASTVisitor< Derived >::WalkUpFromUnqualTypeLoc | ( | UnqualTypeLoc | TL | ) | [inline] |
Definition at line 378 of file RecursiveASTVisitor.h.