15#ifndef LLVM_CLANG_FRONTEND_TEXTDIAGNOSTIC_H
16#define LLVM_CLANG_FRONTEND_TEXTDIAGNOSTIC_H
19#include "llvm/Support/raw_ostream.h"
48 enum llvm::raw_ostream::Colors
Color;
49 StyleRange(
unsigned S,
unsigned E,
enum llvm::raw_ostream::Colors
C)
81 StringRef Message,
unsigned CurrentColumn,
82 unsigned Columns,
bool ShowColors);
97 emitSnippetAndCaret(Loc, Level, Ranges, Hints);
103 StringRef ModuleName)
override;
106 StringRef ModuleName)
override;
115 void emitSnippet(StringRef SourceLine,
unsigned MaxLineNoDisplayWidth,
116 unsigned LineNo,
unsigned DisplayLineNo,
Options for controlling the compiler diagnostics engine.
const LangOptions & LangOpts
DiagnosticOptions & DiagOpts
DiagnosticRenderer(const LangOptions &LangOpts, DiagnosticOptions &DiagOpts)
Level
The level of the diagnostic, after it has been through mapping.
A SourceLocation and its associated SourceManager.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
Represents an unpacked "presumed" location which can be presented to the user.
This class handles loading and caching of source files into memory.
void emitCodeContext(FullSourceLoc Loc, DiagnosticsEngine::Level Level, SmallVectorImpl< CharSourceRange > &Ranges, ArrayRef< FixItHint > Hints) override
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.
~TextDiagnostic() override
void emitImportLocation(FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName) override
void emitIncludeLocation(FullSourceLoc Loc, PresumedLoc PLoc) override
TextDiagnostic(raw_ostream &OS, const LangOptions &LangOpts, DiagnosticOptions &DiagOpts, const Preprocessor *PP=nullptr)
static void printDiagnosticLevel(raw_ostream &OS, DiagnosticsEngine::Level Level, bool ShowColors)
Print the diagonstic level to a raw_ostream.
void emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, ArrayRef< CharSourceRange > Ranges) override
Print out the file/line/column information and include trace.
void emitDiagnosticMessage(FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, StringRef Message, ArrayRef< CharSourceRange > Ranges, DiagOrStoredDiag D) override
void emitBuildingModuleLocation(FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName) override
The JSON file list parser is used to communicate input to InstallAPI.
llvm::PointerUnion< const Diagnostic *, const StoredDiagnostic * > DiagOrStoredDiag
enum llvm::raw_ostream::Colors Color
StyleRange(unsigned S, unsigned E, enum llvm::raw_ostream::Colors C)