class MatchFinder::MatchCallback

Declaration

class MatchFinder::MatchCallback { /* full declaration omitted */ };

Description

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

Declared at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:91

Method Overview

Methods

virtual llvm::Optional<TraversalKind>
getCheckTraversalKind() const

Description

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.

Declared at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:118

virtual llvm::StringRef getID() const

Description

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

Declared at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:112

virtual void onEndOfTranslationUnit()

Description

Called at the end of each translation unit. Optionally override to do per translation unit tasks.

Declared at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:106

virtual void onStartOfTranslationUnit()

Description

Called at the start of each translation unit. Optionally override to do per translation unit tasks.

Declared at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:101

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

Description

Called on every match by the \c MatchFinder.

Declared at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:96

Parameters

const clang::ast_matchers::MatchFinder:: MatchResult& Result

virtual ~MatchCallback()

Declared at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:93