clang  15.0.0git
Public Member Functions | List of all members
clang::format::FatalDiagnosticConsumer Class Reference
Inheritance diagram for clang::format::FatalDiagnosticConsumer:
Inheritance graph
[legend]
Collaboration diagram for clang::format::FatalDiagnosticConsumer:
Collaboration graph
[legend]

Public Member Functions

void HandleDiagnostic (DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override
 Handle this diagnostic, reporting it to the user or capturing it to a log as needed. More...
 
bool fatalError () const
 
- Public Member Functions inherited from clang::DiagnosticConsumer
 DiagnosticConsumer ()=default
 
virtual ~DiagnosticConsumer ()
 
unsigned getNumErrors () const
 
unsigned getNumWarnings () const
 
virtual void clear ()
 
virtual void BeginSourceFile (const LangOptions &LangOpts, const Preprocessor *PP=nullptr)
 Callback to inform the diagnostic client that processing of a source file is beginning. More...
 
virtual void EndSourceFile ()
 Callback to inform the diagnostic client that processing of a source file has ended. More...
 
virtual void finish ()
 Callback to inform the diagnostic client that processing of all source files has ended. More...
 
virtual bool IncludeInDiagnosticCounts () const
 Indicates whether the diagnostics handled by this DiagnosticConsumer should be included in the number of diagnostics reported by DiagnosticsEngine. More...
 

Additional Inherited Members

- Protected Attributes inherited from clang::DiagnosticConsumer
unsigned NumWarnings = 0
 Number of warnings reported. More...
 
unsigned NumErrors = 0
 Number of errors reported. More...
 

Detailed Description

Definition at line 40 of file TokenAnalyzer.cpp.

Member Function Documentation

◆ fatalError()

bool clang::format::FatalDiagnosticConsumer::fatalError ( ) const
inline

Definition at line 52 of file TokenAnalyzer.cpp.

Referenced by clang::format::Environment::make().

◆ HandleDiagnostic()

void clang::format::FatalDiagnosticConsumer::HandleDiagnostic ( DiagnosticsEngine::Level  DiagLevel,
const Diagnostic Info 
)
inlineoverridevirtual

Handle this diagnostic, reporting it to the user or capturing it to a log as needed.

The default implementation just keeps track of the total number of warnings and errors.

Reimplemented from clang::DiagnosticConsumer.

Definition at line 42 of file TokenAnalyzer.cpp.

References clang::DiagnosticsEngine::Fatal, and clang::Diagnostic::FormatDiagnostic().


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