clang 22.0.0git
TextDiagnosticPrinter.cpp File Reference
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/TextDiagnostic.h"
#include "clang/Lex/Lexer.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"

Go to the source code of this file.

Functions

static void printDiagnosticOptions (raw_ostream &OS, DiagnosticsEngine::Level Level, const Diagnostic &Info, const DiagnosticOptions &DiagOpts)
 Print any diagnostic option information to a raw_ostream.

Function Documentation

◆ printDiagnosticOptions()

void printDiagnosticOptions ( raw_ostream & OS,
DiagnosticsEngine::Level Level,
const Diagnostic & Info,
const DiagnosticOptions & DiagOpts )
static

Print any diagnostic option information to a raw_ostream.

This implements all of the logic for adding diagnostic options to a message (via OS). Each relevant option is comma separated and all are enclosed in the standard bracketing: " [...]".

Definition at line 47 of file TextDiagnosticPrinter.cpp.

References clang::DiagnosticsEngine::Error, clang::DiagnosticIDs::getCategoryNameFromID(), clang::DiagnosticIDs::getCategoryNumberForDiag(), clang::DiagnosticsEngine::getDiagnosticIDs(), clang::Diagnostic::getDiags(), clang::Diagnostic::getFlagValue(), clang::Diagnostic::getID(), and clang::DiagnosticsEngine::Remark.

Referenced by clang::TextDiagnosticPrinter::HandleDiagnostic().