clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::ast_matchers::internal::CollectMatchesCallback Class Reference

#include "clang/ASTMatchers/ASTMatchFinder.h"

Inheritance diagram for clang::ast_matchers::internal::CollectMatchesCallback:
Inheritance graph
[legend]

Public Member Functions

void run (const MatchFinder::MatchResult &Result) override
 Called on every match by the MatchFinder.
 
std::optional< TraversalKindgetCheckTraversalKind () const override
 TraversalKind to use while matching and processing the result nodes.
 
- Public Member Functions inherited from clang::ast_matchers::MatchFinder::MatchCallback
virtual ~MatchCallback ()
 
virtual void run (const MatchResult &Result)=0
 Called on every match by the MatchFinder.
 
virtual void onStartOfTranslationUnit ()
 Called at the start of each translation unit.
 
virtual void onEndOfTranslationUnit ()
 Called at the end of each translation unit.
 
virtual StringRef getID () const
 An id used to group the matchers.
 
virtual std::optional< TraversalKindgetCheckTraversalKind () const
 TraversalKind to use while matching and processing the result nodes.
 

Public Attributes

SmallVector< BoundNodes, 1 > Nodes
 

Detailed Description

Definition at line 287 of file ASTMatchFinder.h.

Member Function Documentation

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::ast_matchers::internal::CollectMatchesCallback::getCheckTraversalKind ( ) const
inlineoverridevirtual

TraversalKind to use while matching and processing the result nodes.

This API is temporary to facilitate third parties porting existing code to the default behavior of clang-tidy.

Reimplemented from clang::ast_matchers::MatchFinder::MatchCallback.

Definition at line 293 of file ASTMatchFinder.h.

◆ run()

void clang::ast_matchers::internal::CollectMatchesCallback::run ( const MatchFinder::MatchResult Result)
inlineoverridevirtual

Called on every match by the MatchFinder.

Implements clang::ast_matchers::MatchFinder::MatchCallback.

Definition at line 289 of file ASTMatchFinder.h.

References Nodes, and clang::Result.

Member Data Documentation

◆ Nodes

SmallVector<BoundNodes, 1> clang::ast_matchers::internal::CollectMatchesCallback::Nodes

Definition at line 297 of file ASTMatchFinder.h.

Referenced by run().


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