clang  14.0.0git
Public Member Functions | List of all members
clang::ast_matchers::MatchFinder::MatchCallback Class Referenceabstract

Called when the Match registered for it was successfully found in the AST. More...

#include "clang/ASTMatchers/ASTMatchFinder.h"

Inheritance diagram for clang::ast_matchers::MatchFinder::MatchCallback:
Inheritance graph
[legend]

Public Member Functions

virtual ~MatchCallback ()
 
virtual void run (const MatchResult &Result)=0
 Called on every match by the MatchFinder. More...
 
virtual void onStartOfTranslationUnit ()
 Called at the start of each translation unit. More...
 
virtual void onEndOfTranslationUnit ()
 Called at the end of each translation unit. More...
 
virtual StringRef getID () const
 An id used to group the matchers. More...
 
virtual llvm::Optional< TraversalKindgetCheckTraversalKind () const
 TraversalKind to use while matching and processing the result nodes. More...
 

Detailed Description

Called when the Match registered for it was successfully found in the AST.

Definition at line 91 of file ASTMatchFinder.h.

Constructor & Destructor Documentation

◆ ~MatchCallback()

clang::ast_matchers::MatchFinder::MatchCallback::~MatchCallback ( )
virtual

Definition at line 1354 of file ASTMatchFinder.cpp.

Member Function Documentation

◆ getCheckTraversalKind()

llvm::Optional< TraversalKind > clang::ast_matchers::MatchFinder::MatchCallback::getCheckTraversalKind ( ) const
virtual

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 in clang::ast_matchers::internal::CollectMatchesCallback.

Definition at line 1487 of file ASTMatchFinder.cpp.

◆ getID()

StringRef clang::ast_matchers::MatchFinder::MatchCallback::getID ( ) const
virtual

An id used to group the matchers.

This id is used, for example, for the profiling output. It defaults to "<unknown>".

Definition at line 1484 of file ASTMatchFinder.cpp.

◆ onEndOfTranslationUnit()

virtual void clang::ast_matchers::MatchFinder::MatchCallback::onEndOfTranslationUnit ( )
inlinevirtual

Called at the end of each translation unit.

Optionally override to do per translation unit tasks.

Definition at line 106 of file ASTMatchFinder.h.

◆ onStartOfTranslationUnit()

virtual void clang::ast_matchers::MatchFinder::MatchCallback::onStartOfTranslationUnit ( )
inlinevirtual

Called at the start of each translation unit.

Optionally override to do per translation unit tasks.

Definition at line 101 of file ASTMatchFinder.h.

◆ run()

virtual void clang::ast_matchers::MatchFinder::MatchCallback::run ( const MatchResult Result)
pure virtual

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