clang  6.0.0svn
Classes | Enumerations | Functions
clang::serialized_diags Namespace Reference

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 {
  SDError::CouldNotLoad = 1, SDError::InvalidSignature, SDError::InvalidDiagnostics, SDError::MalformedTopLevelBlock,
  SDError::MalformedSubBlock, SDError::MalformedBlockInfoBlock, SDError::MalformedMetadataBlock, SDError::MalformedDiagnosticBlock,
  SDError::MalformedDiagnosticRecord, SDError::MissingVersion, SDError::VersionMismatch, SDError::UnsupportedConstruct,
  SDError::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< DiagnosticConsumercreate (StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false)
 Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file. More...
 
const std::error_category & SDErrorCategory ()
 
std::error_code make_error_code (SDError E)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The serialized diagnostics version number.

Enumerator
VersionNumber 

Definition at line 54 of file SerializedDiagnostics.h.

◆ BlockIDs

Enumerator
BLOCK_META 

A top-level block which represents any meta data associated with the diagostics, including versioning of the format.

BLOCK_DIAG 

The this block acts as a container for all the information for a specific diagnostic.

Definition at line 18 of file SerializedDiagnostics.h.

◆ Level

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.

Enumerator
Ignored 
Note 
Warning 
Error 
Fatal 
Remark 

Definition at line 44 of file SerializedDiagnostics.h.

◆ RecordIDs

Enumerator
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.

◆ SDError

Enumerator
CouldNotLoad 
InvalidSignature 
InvalidDiagnostics 
MalformedTopLevelBlock 
MalformedSubBlock 
MalformedBlockInfoBlock 
MalformedMetadataBlock 
MalformedDiagnosticBlock 
MalformedDiagnosticRecord 
MissingVersion 
VersionMismatch 
UnsupportedConstruct 
HandlerFailed 

A generic error for subclass handlers that don't want or need to define their own error_category.

Definition at line 20 of file SerializedDiagnosticReader.h.

Function Documentation

◆ create()

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 297 of file SerializedDiagnosticPrinter.cpp.

Referenced by clang::CodeGen::CGOpenMPRuntime(), clang::ItaniumMangleContext::classof(), clang::MicrosoftMangleContext::classof(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::ento::PathDiagnosticLocation::create(), clang::ast_type_traits::DynTypedNode::create(), clang::SourceManager::createExpansionLoc(), clang::SrcMgr::ExpansionInfo::createForMacroArg(), emitConstructorDestructorAlias(), clang::AnalysisDeclContext::getAnalysis(), clang::CodeGen::CodeGenFunction::getBlockByrefInfo(), clang::CodeGen::CodeGenModule::getBlockDescriptorType(), GetConstantStringEntry(), clang::ASTContext::getParents(), clang::CodeGen::CGOpenCLRuntime::getPipeType(), clang::CodeGen::CGOpenCLRuntime::getSamplerType(), getVFSEntries(), clang::CodeGen::CodeGenModule::HandleCXXStaticMemberVarInstantiation(), clang::ast_type_traits::DynTypedNode::DenseMapInfo::isEqual(), clang::tooling::newFrontendActionFactory(), clang::tooling::FrontendActionFactory::runInvocation(), setPGOUseInstrumentor(), SetupSerializedDiagnostics(), SymbolNameForMethod(), clang::CodeGen::CodeGenModule::TryEmitDefinitionAsAlias(), and clang::ast_matchers::dynamic::internal::MatcherDescriptor::~MatcherDescriptor().

◆ make_error_code()

std::error_code clang::serialized_diags::make_error_code ( SDError  E)
inline

Definition at line 40 of file SerializedDiagnosticReader.h.

◆ SDErrorCategory()

const std::error_category & clang::serialized_diags::SDErrorCategory ( )

Definition at line 296 of file SerializedDiagnosticReader.cpp.

References ErrorCategory.