clang-tools 22.0.0git
clang::tidy::ClangTidyDiagnosticConsumer Class Reference

A diagnostic consumer that turns each Diagnostic into a SourceManager-independent ClangTidyError. More...

#include <ClangTidyDiagnosticConsumer.h>

Inheritance diagram for clang::tidy::ClangTidyDiagnosticConsumer:
[legend]

Public Member Functions

 ClangTidyDiagnosticConsumer (ClangTidyContext &Ctx, DiagnosticsEngine *ExternalDiagEngine=nullptr, bool RemoveIncompatibleErrors=true, bool GetFixesFromNotes=false, bool EnableNolintBlocks=true)
void HandleDiagnostic (DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override
void BeginSourceFile (const LangOptions &LangOpts, const Preprocessor *PP=nullptr) override
void EndSourceFile () override
std::vector< ClangTidyErrortake ()

Detailed Description

A diagnostic consumer that turns each Diagnostic into a SourceManager-independent ClangTidyError.

Definition at line 288 of file ClangTidyDiagnosticConsumer.h.

Constructor & Destructor Documentation

◆ ClangTidyDiagnosticConsumer()

ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer ( ClangTidyContext & Ctx,
DiagnosticsEngine * ExternalDiagEngine = nullptr,
bool RemoveIncompatibleErrors = true,
bool GetFixesFromNotes = false,
bool EnableNolintBlocks = true )
Parameters
EnableNolintBlocksEnables diagnostic-disabling inside blocks of code, delimited by NOLINTBEGIN and NOLINTEND.

Definition at line 308 of file ClangTidyDiagnosticConsumer.cpp.

Member Function Documentation

◆ BeginSourceFile()

void ClangTidyDiagnosticConsumer::BeginSourceFile ( const LangOptions & LangOpts,
const Preprocessor * PP = nullptr )
override

Definition at line 362 of file ClangTidyDiagnosticConsumer.cpp.

◆ EndSourceFile()

void ClangTidyDiagnosticConsumer::EndSourceFile ( )
override

Definition at line 370 of file ClangTidyDiagnosticConsumer.cpp.

◆ HandleDiagnostic()

void ClangTidyDiagnosticConsumer::HandleDiagnostic ( DiagnosticsEngine::Level DiagLevel,
const Diagnostic & Info )
override

Definition at line 377 of file ClangTidyDiagnosticConsumer.cpp.

◆ take()

std::vector< ClangTidyError > ClangTidyDiagnosticConsumer::take ( )

Definition at line 776 of file ClangTidyDiagnosticConsumer.cpp.

Referenced by clang::tidy::runClangTidy().


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