clang API Documentation
Classes | |
struct | Location |
A location that is represented in the serialized diagnostics. More... | |
class | SerializedDiagnosticReader |
A base class that handles reading serialized diagnostics from a file. More... | |
Enumerations | |
enum | SDError { CouldNotLoad = 1, InvalidSignature, InvalidDiagnostics, MalformedTopLevelBlock, MalformedSubBlock, MalformedBlockInfoBlock, MalformedMetadataBlock, MalformedDiagnosticBlock, MalformedDiagnosticRecord, MissingVersion, VersionMismatch, UnsupportedConstruct, HandlerFailed } |
enum | BlockIDs { BLOCK_META = llvm::bitc::FIRST_APPLICATION_BLOCKID, BLOCK_DIAG } |
enum | RecordIDs { RECORD_VERSION = 1, RECORD_DIAG, RECORD_SOURCE_RANGE, RECORD_DIAG_FLAG, RECORD_CATEGORY, RECORD_FILENAME, RECORD_FIXIT, RECORD_FIRST = RECORD_VERSION, RECORD_LAST = RECORD_FIXIT } |
enum | Level { Ignored = 0, Note, Warning, Error, Fatal, Remark } |
A stable version of DiagnosticIDs::Level. More... | |
enum | { VersionNumber = 2 } |
The serialized diagnostics version number. More... | |
Functions | |
std::unique_ptr < DiagnosticConsumer > | create (StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false) |
Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file. | |
const std::error_category & | SDErrorCategory () |
std::error_code | make_error_code (SDError E) |
anonymous enum |
The serialized diagnostics version number.
Definition at line 54 of file SerializedDiagnostics.h.
Definition at line 18 of file SerializedDiagnostics.h.
A stable version of DiagnosticIDs::Level.
Do not change the order of values in this enum, and please increment the serialized diagnostics version number when you add to it.
Definition at line 44 of file SerializedDiagnostics.h.
RECORD_VERSION | |
RECORD_DIAG | |
RECORD_SOURCE_RANGE | |
RECORD_DIAG_FLAG | |
RECORD_CATEGORY | |
RECORD_FILENAME | |
RECORD_FIXIT | |
RECORD_FIRST | |
RECORD_LAST |
Definition at line 28 of file SerializedDiagnostics.h.
Definition at line 21 of file SerializedDiagnosticReader.h.
std::unique_ptr< DiagnosticConsumer > clang::serialized_diags::create | ( | StringRef | OutputFile, |
DiagnosticOptions * | Diags, | ||
bool | MergeChildRecords = false |
||
) |
Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file.
The created DiagnosticConsumer is designed for quick and lightweight transfer of of diagnostics to the enclosing build system (e.g., an IDE). This allows wrapper tools for Clang to get diagnostics from Clang (via libclang) without needing to parse Clang's command line output.
Definition at line 309 of file SerializedDiagnosticPrinter.cpp.
Referenced by clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(), clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P(), clang::CodeGen::CodeGenFunction::BuildByRefType(), clang::CodeGen::CGOpenMPRuntime(), clang::CodeGen::CodeGenModule::CodeGenModule(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::SourceManager::createExpansionLoc(), clang::ASTContext::createMangleContext(), emitConstructorDestructorAlias(), EmitGlobalDeclMetadata(), clang::AnalysisDeclContext::getAnalysis(), clang::CodeGen::CodeGenModule::getBlockDescriptorType(), clang::CodeGen::CodeGenModule::getGenericBlockLiteralType(), getLocationForCaller(), clang::tooling::newFrontendActionFactory(), ParseDirective(), clang::driver::SanitizerArgs::SanitizerArgs(), SetupSerializedDiagnostics(), clang::CodeGen::CodeGenModule::TryEmitDefinitionAsAlias(), and clang::ento::TrackConstraintBRVisitor::VisitNode().
std::error_code clang::serialized_diags::make_error_code | ( | SDError | E | ) | [inline] |
Definition at line 41 of file SerializedDiagnosticReader.h.
References SDErrorCategory().
const std::error_category & clang::serialized_diags::SDErrorCategory | ( | ) |
Definition at line 293 of file SerializedDiagnosticReader.cpp.
References ErrorCategory.
Referenced by make_error_code().