16 #ifndef LLVM_CLANG_FRONTEND_TEXTDIAGNOSTIC_H 17 #define LLVM_CLANG_FRONTEND_TEXTDIAGNOSTIC_H 55 bool CLFallbackMode =
false);
74 StringRef Message,
unsigned CurrentColumn,
75 unsigned Columns,
bool ShowColors);
90 emitSnippetAndCaret(Loc, Level, Ranges, Hints);
96 StringRef ModuleName)
override;
99 StringRef ModuleName)
override;
108 void emitSnippet(StringRef SourceLine);
llvm::PointerUnion< const Diagnostic *, const StoredDiagnostic * > DiagOrStoredDiag
const LangOptions & LangOpts
Class to encapsulate the logic for formatting and printing a textual diagnostic message.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Class to encapsulate the logic for formatting a diagnostic message.
void emitDiagnosticMessage(FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, StringRef Message, ArrayRef< CharSourceRange > Ranges, DiagOrStoredDiag D) override
TextDiagnostic(raw_ostream &OS, const LangOptions &LangOpts, DiagnosticOptions *DiagOpts)
void emitBuildingModuleLocation(FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName) override
~TextDiagnostic() override
void emitIncludeLocation(FullSourceLoc Loc, PresumedLoc PLoc) override
void emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, ArrayRef< CharSourceRange > Ranges) override
Print out the file/line/column information and include trace.
IntrusiveRefCntPtr< DiagnosticOptions > DiagOpts
Represents an unpacked "presumed" location which can be presented to the user.
Options for controlling the compiler diagnostics engine.
static void printDiagnosticLevel(raw_ostream &OS, DiagnosticsEngine::Level Level, bool ShowColors, bool CLFallbackMode=false)
Print the diagonstic level to a raw_ostream.
static void printDiagnosticMessage(raw_ostream &OS, bool IsSupplemental, StringRef Message, unsigned CurrentColumn, unsigned Columns, bool ShowColors)
Pretty-print a diagnostic message to a raw_ostream.
Dataflow Directional Tag Classes.
void emitCodeContext(FullSourceLoc Loc, DiagnosticsEngine::Level Level, SmallVectorImpl< CharSourceRange > &Ranges, ArrayRef< FixItHint > Hints) override
Level
The level of the diagnostic, after it has been through mapping.
A SourceLocation and its associated SourceManager.
void emitImportLocation(FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName) override
This class handles loading and caching of source files into memory.