clang  8.0.0svn
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]
Collaboration diagram for clang::TextDiagnosticBuffer:
Collaboration 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. More...
 
void FlushDiagnostics (DiagnosticsEngine &Diags) const
 FlushDiagnostics - Flush the buffered diagnostics to an given diagnostic engine. More...
 
- 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 26 of file TextDiagnosticBuffer.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 30 of file TextDiagnosticBuffer.h.

◆ DiagList

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

Definition at line 28 of file TextDiagnosticBuffer.h.

◆ iterator

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

Definition at line 29 of file TextDiagnosticBuffer.h.

Member Function Documentation

◆ err_begin()

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

Definition at line 42 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ err_end()

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

Definition at line 43 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ FlushDiagnostics()

void TextDiagnosticBuffer::FlushDiagnostics ( DiagnosticsEngine Diags) const

FlushDiagnostics - Flush the buffered diagnostics to an given diagnostic engine.

Definition at line 54 of file TextDiagnosticBuffer.cpp.

Referenced by note_end().

◆ HandleDiagnostic()

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

◆ note_begin()

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

Definition at line 51 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ note_end()

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

Definition at line 52 of file TextDiagnosticBuffer.h.

References FlushDiagnostics(), and HandleDiagnostic().

Referenced by CheckResults().

◆ remark_begin()

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

Definition at line 48 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ remark_end()

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

Definition at line 49 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ warn_begin()

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

Definition at line 45 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().

◆ warn_end()

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

Definition at line 46 of file TextDiagnosticBuffer.h.

Referenced by CheckResults().


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