class SerializedDiagnosticReader

Declaration

class SerializedDiagnosticReader { /* full declaration omitted */ };

Description

A base class that handles reading serialized diagnostics from a file. Subclasses should override the visit* methods with their logic for handling the various constructs that are found in serialized diagnostics.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:60

Method Overview

Methods

SerializedDiagnosticReader()

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:62

std::error_code readDiagnosticBlock(
    llvm::BitstreamCursor& Stream)

Description

Read a diagnostic block from \c Stream.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:79

Parameters

llvm::BitstreamCursor& Stream

std::error_code readDiagnostics(
    llvm::StringRef File)

Description

Read the diagnostics in \c File

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:66

Parameters

llvm::StringRef File

std::error_code readMetaBlock(
    llvm::BitstreamCursor& Stream)

Description

Read a metadata block from \c Stream.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:76

Parameters

llvm::BitstreamCursor& Stream

llvm::ErrorOr<Cursor> skipUntilRecordOrBlock(
    llvm::BitstreamCursor& Stream,
    unsigned int& BlockOrRecordId)

Description

Read to the next record or block to process.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:72

Parameters

llvm::BitstreamCursor& Stream
unsigned int& BlockOrRecordId

virtual std::error_code visitCategoryRecord(
    unsigned int ID,
    llvm::StringRef Name)

Description

Visit a category. This associates the category \c ID to a \c Name.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:89

Parameters

unsigned int ID
llvm::StringRef Name

virtual std::error_code visitDiagFlagRecord(
    unsigned int ID,
    llvm::StringRef Name)

Description

Visit a flag. This associates the flag's \c ID to a \c Name.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:94

Parameters

unsigned int ID
llvm::StringRef Name

virtual std::error_code visitDiagnosticRecord(
    unsigned int Severity,
    const clang::serialized_diags::Location&
        Location,
    unsigned int Category,
    unsigned int Flag,
    llvm::StringRef Message)

Description

Visit a diagnostic.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:100

Parameters

unsigned int Severity
const clang::serialized_diags::Location& Location
unsigned int Category
unsigned int Flag
llvm::StringRef Message

virtual std::error_code visitEndOfDiagnostic()

Description

Visit the end of a diagnostic block.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:86

virtual std::error_code visitFilenameRecord(
    unsigned int ID,
    unsigned int Size,
    unsigned int Timestamp,
    llvm::StringRef Name)

Description

Visit a filename. This associates the file's \c ID to a \c Name.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:106

Parameters

unsigned int ID
unsigned int Size
unsigned int Timestamp
llvm::StringRef Name

virtual std::error_code visitFixitRecord(
    const clang::serialized_diags::Location&
        Start,
    const clang::serialized_diags::Location& End,
    llvm::StringRef Text)

Description

Visit a fixit hint.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:114

Parameters

const clang::serialized_diags::Location& Start
const clang::serialized_diags::Location& End
llvm::StringRef Text

virtual std::error_code visitSourceRangeRecord(
    const clang::serialized_diags::Location&
        Start,
    const clang::serialized_diags::Location& End)

Description

Visit a source range.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:119

Parameters

const clang::serialized_diags::Location& Start
const clang::serialized_diags::Location& End

virtual std::error_code visitStartOfDiagnostic()

Description

Visit the start of a diagnostic block.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:83

virtual std::error_code visitVersionRecord(
    unsigned int Version)

Description

Visit the version of the set of diagnostics.

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:125

Parameters

unsigned int Version

virtual ~SerializedDiagnosticReader()

Declared at: clang/include/clang/Frontend/SerializedDiagnosticReader.h:63