clang API Documentation

Public Member Functions
clang::TextDiagnosticPrinter Class Reference

#include <TextDiagnosticPrinter.h>

Inheritance diagram for clang::TextDiagnosticPrinter:
Inheritance graph
[legend]
Collaboration diagram for clang::TextDiagnosticPrinter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TextDiagnosticPrinter (raw_ostream &os, DiagnosticOptions *diags, bool OwnsOutputStream=false)
virtual ~TextDiagnosticPrinter ()
void setPrefix (std::string Value)
void BeginSourceFile (const LangOptions &LO, const Preprocessor *PP) override
 Callback to inform the diagnostic client that processing of a source file is beginning.
void EndSourceFile () override
 Callback to inform the diagnostic client that processing of a source file has ended.
void HandleDiagnostic (DiagnosticsEngine::Level Level, const Diagnostic &Info) override
 Handle this diagnostic, reporting it to the user or capturing it to a log as needed.

Detailed Description

Definition at line 28 of file TextDiagnosticPrinter.h.


Constructor & Destructor Documentation

TextDiagnosticPrinter::TextDiagnosticPrinter ( raw_ostream &  os,
DiagnosticOptions diags,
bool  OwnsOutputStream = false 
)

Definition at line 27 of file TextDiagnosticPrinter.cpp.

Definition at line 34 of file TextDiagnosticPrinter.cpp.


Member Function Documentation

void TextDiagnosticPrinter::BeginSourceFile ( const LangOptions LangOpts,
const Preprocessor PP 
) [override, virtual]

Callback to inform the diagnostic client that processing of a source file is beginning.

Note that diagnostics may be emitted outside the processing of a source file, for example during the parsing of command line options. However, diagnostics with source range information are required to only be emitted in between BeginSourceFile() and EndSourceFile().

Parameters:
LangOptsThe language options for the source file being processed.
PPThe preprocessor object being used for the source; this is optional, e.g., it may not be present when processing AST source files.

Reimplemented from clang::DiagnosticConsumer.

Definition at line 39 of file TextDiagnosticPrinter.cpp.

Referenced by emitPremigrationErrors().

void TextDiagnosticPrinter::EndSourceFile ( ) [override, virtual]

Callback to inform the diagnostic client that processing of a source file has ended.

The diagnostic client should assume that any objects made available via BeginSourceFile() are inaccessible.

Reimplemented from clang::DiagnosticConsumer.

Definition at line 45 of file TextDiagnosticPrinter.cpp.

Referenced by emitPremigrationErrors().

void TextDiagnosticPrinter::HandleDiagnostic ( DiagnosticsEngine::Level  DiagLevel,
const Diagnostic Info 
) [override, virtual]
void clang::TextDiagnosticPrinter::setPrefix ( std::string  Value) [inline]

setPrefix - Set the diagnostic printer prefix string, which will be printed at the start of any diagnostics. If empty, no prefix string is used.

Definition at line 48 of file TextDiagnosticPrinter.h.


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