clang API Documentation
#include <LogDiagnosticPrinter.h>


Classes | |
| struct | DiagEntry |
Public Member Functions | |
| LogDiagnosticPrinter (raw_ostream &OS, DiagnosticOptions *Diags, std::unique_ptr< raw_ostream > StreamOwner) | |
| void | setDwarfDebugFlags (StringRef 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 DiagLevel, const Diagnostic &Info) override |
| Handle this diagnostic, reporting it to the user or capturing it to a log as needed. | |
Definition at line 22 of file LogDiagnosticPrinter.h.
| LogDiagnosticPrinter::LogDiagnosticPrinter | ( | raw_ostream & | OS, |
| DiagnosticOptions * | Diags, | ||
| std::unique_ptr< raw_ostream > | StreamOwner | ||
| ) |
Definition at line 21 of file LogDiagnosticPrinter.cpp.
| void clang::LogDiagnosticPrinter::BeginSourceFile | ( | const LangOptions & | LangOpts, |
| const Preprocessor * | PP | ||
| ) | [inline, 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().
| LangOpts | The language options for the source file being processed. |
| PP | The 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 73 of file LogDiagnosticPrinter.h.
| void LogDiagnosticPrinter::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 77 of file LogDiagnosticPrinter.cpp.
References clang::markup::EmitString().
| void LogDiagnosticPrinter::HandleDiagnostic | ( | DiagnosticsEngine::Level | DiagLevel, |
| const Diagnostic & | Info | ||
| ) | [override, virtual] |
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 112 of file LogDiagnosticPrinter.cpp.
References clang::Diagnostic::FormatDiagnostic(), clang::PresumedLoc::getColumn(), clang::SourceManager::getFileEntryForID(), clang::SourceManager::getFileID(), clang::PresumedLoc::getFilename(), clang::Diagnostic::getID(), clang::PresumedLoc::getLine(), clang::Diagnostic::getLocation(), clang::SourceManager::getMainFileID(), clang::FileEntry::getName(), clang::SourceManager::getPresumedLoc(), clang::Diagnostic::getSourceManager(), clang::DiagnosticIDs::getWarningOptionForDiag(), clang::Diagnostic::hasSourceManager(), clang::FileID::isInvalid(), clang::PresumedLoc::isInvalid(), clang::FileEntry::isValid(), clang::SourceLocation::isValid(), and SM.
| void clang::LogDiagnosticPrinter::setDwarfDebugFlags | ( | StringRef | Value | ) | [inline] |
Definition at line 69 of file LogDiagnosticPrinter.h.