ΒΆstd::unique_ptr<DiagnosticConsumer> create(
    llvm::StringRef OutputFile,
    clang::DiagnosticOptions* Diags,
    bool MergeChildRecords = false)

Description

Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file. The created DiagnosticConsumer is designed for quick and lightweight transfer 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.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticPrinter.h:34

Parameters

llvm::StringRef OutputFile
clang::DiagnosticOptions* Diags
bool MergeChildRecords = false