clang
19.0.0git
|
A base class that handles reading serialized diagnostics from a file. More...
#include "clang/Frontend/SerializedDiagnosticReader.h"
Public Member Functions | |
SerializedDiagnosticReader ()=default | |
virtual | ~SerializedDiagnosticReader ()=default |
std::error_code | readDiagnostics (StringRef File) |
Read the diagnostics in File . More... | |
Protected Member Functions | |
virtual std::error_code | visitStartOfDiagnostic () |
Visit the start of a diagnostic block. More... | |
virtual std::error_code | visitEndOfDiagnostic () |
Visit the end of a diagnostic block. More... | |
virtual std::error_code | visitCategoryRecord (unsigned ID, StringRef Name) |
Visit a category. This associates the category ID to a Name . More... | |
virtual std::error_code | visitDiagFlagRecord (unsigned ID, StringRef Name) |
Visit a flag. This associates the flag's ID to a Name . More... | |
virtual std::error_code | visitDiagnosticRecord (unsigned Severity, const Location &Location, unsigned Category, unsigned Flag, StringRef Message) |
Visit a diagnostic. More... | |
virtual std::error_code | visitFilenameRecord (unsigned ID, unsigned Size, unsigned Timestamp, StringRef Name) |
Visit a filename. This associates the file's ID to a Name . More... | |
virtual std::error_code | visitFixitRecord (const Location &Start, const Location &End, StringRef Text) |
Visit a fixit hint. More... | |
virtual std::error_code | visitSourceRangeRecord (const Location &Start, const Location &End) |
Visit a source range. More... | |
virtual std::error_code | visitVersionRecord (unsigned Version) |
Visit the version of the set of diagnostics. More... | |
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.
Definition at line 60 of file SerializedDiagnosticReader.h.
|
default |
|
virtualdefault |
std::error_code SerializedDiagnosticReader::readDiagnostics | ( | StringRef | File | ) |
Read the diagnostics in File
.
Definition at line 28 of file SerializedDiagnosticReader.cpp.
References clang::serialized_diags::BLOCK_DIAG, clang::serialized_diags::BLOCK_META, clang::serialized_diags::CouldNotLoad, clang::File, clang::FileManager::getBufferForFile(), clang::serialized_diags::InvalidDiagnostics, clang::serialized_diags::InvalidSignature, clang::serialized_diags::MalformedBlockInfoBlock, and clang::serialized_diags::MalformedTopLevelBlock.
|
inlineprotectedvirtual |
Visit a category. This associates the category ID
to a Name
.
Definition at line 89 of file SerializedDiagnosticReader.h.
|
inlineprotectedvirtual |
Visit a flag. This associates the flag's ID
to a Name
.
Definition at line 94 of file SerializedDiagnosticReader.h.
|
inlineprotectedvirtual |
Visit a diagnostic.
Definition at line 100 of file SerializedDiagnosticReader.h.
|
inlineprotectedvirtual |
Visit the end of a diagnostic block.
Definition at line 86 of file SerializedDiagnosticReader.h.
|
inlineprotectedvirtual |
Visit a filename. This associates the file's ID
to a Name
.
Definition at line 106 of file SerializedDiagnosticReader.h.
|
inlineprotectedvirtual |
Visit a fixit hint.
Definition at line 114 of file SerializedDiagnosticReader.h.
|
inlineprotectedvirtual |
Visit a source range.
Definition at line 119 of file SerializedDiagnosticReader.h.
|
inlineprotectedvirtual |
Visit the start of a diagnostic block.
Definition at line 83 of file SerializedDiagnosticReader.h.
|
inlineprotectedvirtual |
Visit the version of the set of diagnostics.
Definition at line 125 of file SerializedDiagnosticReader.h.