clang API Documentation
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/TextDiagnostic.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
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. |
static 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 54 of file TextDiagnosticPrinter.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticIDs::getCategoryNameFromID(), clang::DiagnosticIDs::getCategoryNumberForDiag(), clang::Diagnostic::getDiags(), clang::DiagnosticsEngine::getFlagValue(), clang::Diagnostic::getID(), clang::DiagnosticIDs::getWarningOptionForDiag(), clang::DiagnosticIDs::isBuiltinWarningOrExtension(), clang::DiagnosticIDs::isDefaultMappingAsError(), and clang::DiagnosticsEngine::Remark.
Referenced by clang::TextDiagnosticPrinter::HandleDiagnostic().