clang API Documentation
#include <TextDiagnosticPrinter.h>


Public Member Functions | |
| TextDiagnosticPrinter (raw_ostream &os, const DiagnosticOptions &diags, bool OwnsOutputStream=false) | |
| virtual | ~TextDiagnosticPrinter () |
| void | setPrefix (std::string Value) |
| void | BeginSourceFile (const LangOptions &LO, const Preprocessor *PP) |
| void | EndSourceFile () |
| void | HandleDiagnostic (DiagnosticsEngine::Level Level, const Diagnostic &Info) |
| DiagnosticConsumer * | clone (DiagnosticsEngine &Diags) const |
| Clone the diagnostic consumer, producing an equivalent consumer that can be used in a different context. | |
Definition at line 27 of file TextDiagnosticPrinter.h.
| TextDiagnosticPrinter::TextDiagnosticPrinter | ( | raw_ostream & | os, |
| const DiagnosticOptions & | diags, | ||
| bool | OwnsOutputStream = false |
||
| ) |
Definition at line 27 of file TextDiagnosticPrinter.cpp.
Referenced by clone().
| TextDiagnosticPrinter::~TextDiagnosticPrinter | ( | ) | [virtual] |
Definition at line 34 of file TextDiagnosticPrinter.cpp.
| void TextDiagnosticPrinter::BeginSourceFile | ( | const LangOptions & | LangOpts, |
| const Preprocessor * | PP | ||
| ) | [virtual] |
BeginSourceFile - 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().
Reimplemented from clang::DiagnosticConsumer.
Definition at line 39 of file TextDiagnosticPrinter.cpp.
Referenced by emitPremigrationErrors().
| DiagnosticConsumer * TextDiagnosticPrinter::clone | ( | DiagnosticsEngine & | Diags | ) | const [virtual] |
Clone the diagnostic consumer, producing an equivalent consumer that can be used in a different context.
Implements clang::DiagnosticConsumer.
Definition at line 170 of file TextDiagnosticPrinter.cpp.
References TextDiagnosticPrinter().
| void TextDiagnosticPrinter::EndSourceFile | ( | ) | [virtual] |
EndSourceFile - 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
Reimplemented from clang::DiagnosticConsumer.
Definition at line 45 of file TextDiagnosticPrinter.cpp.
Referenced by emitPremigrationErrors().
| void TextDiagnosticPrinter::HandleDiagnostic | ( | DiagnosticsEngine::Level | DiagLevel, |
| const Diagnostic & | Info | ||
| ) | [virtual] |
HandleDiagnostic - Handle this diagnostic, reporting it to the user or capturing it to a log as needed.
Default implementation just keeps track of the total number of warnings and errors.
Reimplemented from clang::DiagnosticConsumer.
Definition at line 118 of file TextDiagnosticPrinter.cpp.
References clang::Diagnostic::FormatDiagnostic(), clang::Diagnostic::getFixItHints(), clang::Diagnostic::getLocation(), clang::Diagnostic::getNumFixItHints(), clang::Diagnostic::getRanges(), clang::Diagnostic::getSourceManager(), clang::Diagnostic::hasSourceManager(), clang::SourceLocation::isValid(), clang::DiagnosticOptions::MessageLength, clang::TextDiagnostic::printDiagnosticLevel(), clang::TextDiagnostic::printDiagnosticMessage(), printDiagnosticOptions(), and clang::DiagnosticOptions::ShowColors.
| 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 47 of file TextDiagnosticPrinter.h.