clang 20.0.0git
Public Member Functions | List of all members
clang::ast_matchers::MatchDescendantVisitor Class Reference
Inheritance diagram for clang::ast_matchers::MatchDescendantVisitor:
Inheritance graph
[legend]

Public Member Functions

 MatchDescendantVisitor (const internal::DynTypedMatcher *Matcher, internal::ASTMatchFinder *Finder, internal::BoundNodesTreeBuilder *Builder, internal::ASTMatchFinder::BindKind Bind, const bool ignoreUnevaluatedContext)
 
bool findMatch (const DynTypedNode &DynNode)
 
bool TraverseDecl (Decl *Node) override
 Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic type.
 
bool TraverseGenericSelectionExpr (GenericSelectionExpr *Node) override
 
bool TraverseUnaryExprOrTypeTraitExpr (UnaryExprOrTypeTraitExpr *Node) override
 
bool TraverseTypeOfExprTypeLoc (TypeOfExprTypeLoc Node) override
 
bool TraverseDecltypeTypeLoc (DecltypeTypeLoc Node) override
 
bool TraverseCXXNoexceptExpr (CXXNoexceptExpr *Node) override
 
bool TraverseCXXTypeidExpr (CXXTypeidExpr *Node) override
 
bool TraverseCXXDefaultInitExpr (CXXDefaultInitExpr *Node) override
 
bool TraverseStmt (Stmt *Node) override
 Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dynamic type.
 
- Public Member Functions inherited from clang::DynamicRecursiveASTVisitor
virtual void anchor ()
 
virtual ~DynamicRecursiveASTVisitor ()=default
 
virtual bool TraverseAST (ASTContext &AST)
 Recursively visits an entire AST, starting from the TranslationUnitDecl.
 
virtual bool TraverseAttr (Attr *At)
 Recursively visit an attribute, by dispatching to Traverse*Attr() based on the argument's dynamic type.
 
virtual bool TraverseConstructorInitializer (CXXCtorInitializer *Init)
 Recursively visit a constructor initializer.
 
virtual bool TraverseCXXBaseSpecifier (const CXXBaseSpecifier &Base)
 Recursively visit a base specifier.
 
virtual bool TraverseDecl (Decl *D)
 Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic type.
 
virtual bool TraverseDeclarationNameInfo (DeclarationNameInfo NameInfo)
 Recursively visit a name with its location information.
 
virtual bool TraverseLambdaCapture (LambdaExpr *LE, const LambdaCapture *C, Expr *Init)
 Recursively visit a lambda capture.
 
virtual bool TraverseNestedNameSpecifier (NestedNameSpecifier *NNS)
 Recursively visit a C++ nested-name-specifier.
 
virtual bool TraverseNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS)
 Recursively visit a C++ nested-name-specifier with location information.
 
virtual bool TraverseStmt (Stmt *S)
 Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dynamic type.
 
virtual bool TraverseTemplateArgument (const TemplateArgument &Arg)
 Recursively visit a template argument and dispatch to the appropriate method for the argument type.
 
virtual bool TraverseTemplateArgumentLoc (const TemplateArgumentLoc &ArgLoc)
 Recursively visit a template argument location and dispatch to the appropriate method for the argument type.
 
bool TraverseTemplateArguments (ArrayRef< TemplateArgument > Args)
 Recursively visit a set of template arguments.
 
virtual bool TraverseTemplateName (TemplateName Template)
 Recursively visit a template name and dispatch to the appropriate method.
 
virtual bool TraverseType (QualType T)
 Recursively visit a type, by dispatching to Traverse*Type() based on the argument's getTypeClass() property.
 
virtual bool TraverseTypeLoc (TypeLoc TL)
 Recursively visit a type with location, by dispatching to Traverse*TypeLoc() based on the argument type's getTypeClass() property.
 
virtual bool TraverseObjCProtocolLoc (ObjCProtocolLoc ProtocolLoc)
 Recursively visit an Objective-C protocol reference with location information.
 
virtual bool TraverseTypeConstraint (const TypeConstraint *C)
 Traverse a concept (requirement).
 
virtual bool TraverseConceptRequirement (concepts::Requirement *R)
 
virtual bool TraverseConceptTypeRequirement (concepts::TypeRequirement *R)
 
virtual bool TraverseConceptExprRequirement (concepts::ExprRequirement *R)
 
virtual bool TraverseConceptNestedRequirement (concepts::NestedRequirement *R)
 
virtual bool TraverseConceptReference (ConceptReference *CR)
 
virtual bool VisitConceptReference (ConceptReference *CR)
 
virtual bool VisitAttr (Attr *A)
 Visit a node.
 
virtual bool VisitDecl (Decl *D)
 
virtual bool VisitStmt (Stmt *S)
 
virtual bool VisitType (Type *T)
 
virtual bool VisitTypeLoc (TypeLoc TL)
 
bool WalkUpFromDecl (Decl *D)
 Walk up from a node.
 
bool WalkUpFromStmt (Stmt *S)
 
bool WalkUpFromType (Type *T)
 
bool WalkUpFromTypeLoc (TypeLoc TL)
 
virtual bool dataTraverseStmtPre (Stmt *S)
 Invoked before visiting a statement or expression via data recursion.
 
virtual bool dataTraverseStmtPost (Stmt *S)
 Invoked after visiting a statement or expression via data recursion.
 
virtual bool dataTraverseNode (Stmt *S)
 

Additional Inherited Members

- Public Attributes inherited from clang::DynamicRecursiveASTVisitor
bool ShouldVisitTemplateInstantiations = false
 Whether this visitor should recurse into template instantiations.
 
bool ShouldWalkTypesOfTypeLocs = true
 Whether this visitor should recurse into the types of TypeLocs.
 
bool ShouldVisitImplicitCode = false
 Whether this visitor should recurse into implicit code, e.g.
 
bool ShouldVisitLambdaBody = true
 Whether this visitor should recurse into lambda body.
 
- Protected Member Functions inherited from clang::DynamicRecursiveASTVisitor
 DynamicRecursiveASTVisitor ()=default
 
 DynamicRecursiveASTVisitor (DynamicRecursiveASTVisitor &&)=default
 
 DynamicRecursiveASTVisitor (const DynamicRecursiveASTVisitor &)=default
 
DynamicRecursiveASTVisitoroperator= (DynamicRecursiveASTVisitor &&)=default
 
DynamicRecursiveASTVisitoroperator= (const DynamicRecursiveASTVisitor &)=default
 

Detailed Description

Definition at line 85 of file UnsafeBufferUsage.cpp.

Constructor & Destructor Documentation

◆ MatchDescendantVisitor()

clang::ast_matchers::MatchDescendantVisitor::MatchDescendantVisitor ( const internal::DynTypedMatcher *  Matcher,
internal::ASTMatchFinder *  Finder,
internal::BoundNodesTreeBuilder *  Builder,
internal::ASTMatchFinder::BindKind  Bind,
const bool  ignoreUnevaluatedContext 
)
inline

Member Function Documentation

◆ findMatch()

bool clang::ast_matchers::MatchDescendantVisitor::findMatch ( const DynTypedNode DynNode)
inline

◆ TraverseCXXDefaultInitExpr()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseCXXDefaultInitExpr ( CXXDefaultInitExpr Node)
inlineoverride

Definition at line 175 of file UnsafeBufferUsage.cpp.

References Node, and TraverseStmt().

◆ TraverseCXXNoexceptExpr()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseCXXNoexceptExpr ( CXXNoexceptExpr Node)
inlineoverride

Definition at line 161 of file UnsafeBufferUsage.cpp.

References Node.

◆ TraverseCXXTypeidExpr()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseCXXTypeidExpr ( CXXTypeidExpr Node)
inlineoverride

Definition at line 168 of file UnsafeBufferUsage.cpp.

References Node.

◆ TraverseDecl()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseDecl ( Decl D)
inlineoverridevirtual

Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic type.

Returns
false if the visitation was terminated early, true otherwise (including when the argument is NULL).

Reimplemented from clang::DynamicRecursiveASTVisitor.

Definition at line 120 of file UnsafeBufferUsage.cpp.

References Node, and clang::DynamicRecursiveASTVisitor::TraverseDecl().

◆ TraverseDecltypeTypeLoc()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseDecltypeTypeLoc ( DecltypeTypeLoc  Node)
inlineoverride

Definition at line 154 of file UnsafeBufferUsage.cpp.

References Node.

◆ TraverseGenericSelectionExpr()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseGenericSelectionExpr ( GenericSelectionExpr Node)
inlineoverride

Definition at line 132 of file UnsafeBufferUsage.cpp.

References Node, and TraverseStmt().

◆ TraverseStmt()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseStmt ( Stmt S)
inlineoverridevirtual

Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dynamic type.

Returns
false if the visitation was terminated early, true otherwise (including when the argument is nullptr).

Reimplemented from clang::DynamicRecursiveASTVisitor.

Definition at line 181 of file UnsafeBufferUsage.cpp.

References Node, and clang::DynamicRecursiveASTVisitor::TraverseStmt().

Referenced by findMatch(), TraverseCXXDefaultInitExpr(), and TraverseGenericSelectionExpr().

◆ TraverseTypeOfExprTypeLoc()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseTypeOfExprTypeLoc ( TypeOfExprTypeLoc  Node)
inlineoverride

Definition at line 147 of file UnsafeBufferUsage.cpp.

References Node.

◆ TraverseUnaryExprOrTypeTraitExpr()

bool clang::ast_matchers::MatchDescendantVisitor::TraverseUnaryExprOrTypeTraitExpr ( UnaryExprOrTypeTraitExpr Node)
inlineoverride

Definition at line 140 of file UnsafeBufferUsage.cpp.

References Node.


The documentation for this class was generated from the following file: