clang 20.0.0git
Public Types | Public Member Functions | List of all members
clang::TextDiagnosticBuffer Class Reference

#include "clang/Frontend/TextDiagnosticBuffer.h"

Inheritance diagram for clang::TextDiagnosticBuffer:
Inheritance graph
[legend]

Public Types

using DiagList = std::vector< std::pair< SourceLocation, std::string > >
 
using iterator = DiagList::iterator
 
using const_iterator = DiagList::const_iterator
 

Public Member Functions

const_iterator err_begin () const
 
const_iterator err_end () const
 
const_iterator warn_begin () const
 
const_iterator warn_end () const
 
const_iterator remark_begin () const
 
const_iterator remark_end () const
 
const_iterator note_begin () const
 
const_iterator note_end () const
 
void HandleDiagnostic (DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override
 HandleDiagnostic - Store the errors, warnings, and notes that are reported.
 
void FlushDiagnostics (DiagnosticsEngine &Diags) const
 FlushDiagnostics - Flush the buffered diagnostics to an given diagnostic engine.
 
- 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.
 
virtual void EndSourceFile ()
 Callback to inform the diagnostic client that processing of a source file has ended.
 
virtual void finish ()
 Callback to inform the diagnostic client that processing of all source files has ended.
 
virtual bool IncludeInDiagnosticCounts () const
 Indicates whether the diagnostics handled by this DiagnosticConsumer should be included in the number of diagnostics reported by DiagnosticsEngine.
 
virtual void HandleDiagnostic (DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info)
 Handle this diagnostic, reporting it to the user or capturing it to a log as needed.
 

Additional Inherited Members

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

Detailed Description

Definition at line 25 of file TextDiagnosticBuffer.h.

Member Typedef Documentation

◆ const_iterator

using clang::TextDiagnosticBuffer::const_iterator = DiagList::const_iterator

Definition at line 29 of file TextDiagnosticBuffer.h.

◆ DiagList

using clang::TextDiagnosticBuffer::DiagList = std::vector<std::pair<SourceLocation, std::string> >

Definition at line 27 of file TextDiagnosticBuffer.h.

◆ iterator

using clang::TextDiagnosticBuffer::iterator = DiagList::iterator

Definition at line 28 of file TextDiagnosticBuffer.h.

Member Function Documentation

◆ err_begin()

const_iterator clang::TextDiagnosticBuffer::err_begin ( ) const
inline

Definition at line 41 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ err_end()

const_iterator clang::TextDiagnosticBuffer::err_end ( ) const
inline

Definition at line 42 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ FlushDiagnostics()

void TextDiagnosticBuffer::FlushDiagnostics ( DiagnosticsEngine Diags) const

◆ HandleDiagnostic()

void TextDiagnosticBuffer::HandleDiagnostic ( DiagnosticsEngine::Level  DiagLevel,
const Diagnostic Info 
)
overridevirtual

◆ note_begin()

const_iterator clang::TextDiagnosticBuffer::note_begin ( ) const
inline

Definition at line 50 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ note_end()

const_iterator clang::TextDiagnosticBuffer::note_end ( ) const
inline

Definition at line 51 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ remark_begin()

const_iterator clang::TextDiagnosticBuffer::remark_begin ( ) const
inline

Definition at line 47 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ remark_end()

const_iterator clang::TextDiagnosticBuffer::remark_end ( ) const
inline

Definition at line 48 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ warn_begin()

const_iterator clang::TextDiagnosticBuffer::warn_begin ( ) const
inline

Definition at line 44 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ warn_end()

const_iterator clang::TextDiagnosticBuffer::warn_end ( ) const
inline

Definition at line 45 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().


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