clang 20.0.0git
|
Called when the Match registered for it was successfully found in the AST. More...
#include "clang/ASTMatchers/ASTMatchFinder.h"
Public Member Functions | |
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< TraversalKind > | getCheckTraversalKind () const |
TraversalKind to use while matching and processing the result nodes. | |
Called when the Match registered for it was successfully found in the AST.
Definition at line 92 of file ASTMatchFinder.h.
|
virtual |
Definition at line 1578 of file ASTMatchFinder.cpp.
|
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 1712 of file ASTMatchFinder.cpp.
Referenced by clang::ast_matchers::MatchFinder::addMatcher().
|
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 1709 of file ASTMatchFinder.cpp.
|
inlinevirtual |
Called at the end of each translation unit.
Optionally override to do per translation unit tasks.
Definition at line 107 of file ASTMatchFinder.h.
|
inlinevirtual |
Called at the start of each translation unit.
Optionally override to do per translation unit tasks.
Definition at line 102 of file ASTMatchFinder.h.
|
pure virtual |
Called on every match by the MatchFinder
.
Implemented in clang::tooling::ReplaceStmtWithText, clang::tooling::ReplaceNodeWithTemplate, clang::tooling::ReplaceStmtWithStmt, clang::tooling::ReplaceIfStmtWithItsBody, clang::tooling::Transformer, and clang::ast_matchers::internal::CollectMatchesCallback.
Referenced by findGadgets().