clang-tools 20.0.0git
Public Member Functions | List of all members
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:
Inheritance graph
[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
 
std::vector< ClangTidyErrortake ()
 

Detailed Description

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

Definition at line 277 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 307 of file ClangTidyDiagnosticConsumer.cpp.

References clang::tidy::ClangTidyOptions::ExcludeHeaderFilterRegex, clang::tidy::ClangTidyContext::getOptions(), and clang::tidy::ClangTidyOptions::HeaderFilterRegex.

Member Function Documentation

◆ HandleDiagnostic()

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

◆ take()

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

Definition at line 748 of file ClangTidyDiagnosticConsumer.cpp.

References Errors.


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