10 #ifndef LLVM_CLANG_FRONTEND_SERIALIZED_DIAGNOSTIC_READER_H_
11 #define LLVM_CLANG_FRONTEND_SERIALIZED_DIAGNOSTIC_READER_H_
14 #include "llvm/ADT/ArrayRef.h"
15 #include "llvm/Bitcode/BitstreamReader.h"
16 #include "llvm/Support/ErrorOr.h"
19 namespace serialized_diags {
52 : FileID(FileID), Line(Line), Col(Col), Offset(Offset) {}
71 llvm::ErrorOr<Cursor> skipUntilRecordOrBlock(llvm::BitstreamCursor &Stream,
72 unsigned &BlockOrRecordId);
75 std::error_code readMetaBlock(llvm::BitstreamCursor &Stream);
78 std::error_code readDiagnosticBlock(llvm::BitstreamCursor &Stream);
83 return std::error_code();
89 return std::error_code();
93 return std::error_code();
96 virtual std::error_code
98 unsigned Category,
unsigned Flag, StringRef Message) {
99 return std::error_code();
105 return std::error_code();
108 virtual std::error_code
110 return std::error_code();
115 return std::error_code();
119 return std::error_code();
std::error_code make_error_code(SDError E)
virtual std::error_code visitStartOfDiagnostic()
Visit the start of a diagnostic block.
virtual ~SerializedDiagnosticReader()
Severity
Enum values that allow the client to map NOTEs, WARNINGs, and EXTENSIONs to either Ignore (nothing)...
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
Location(unsigned FileID, unsigned Line, unsigned Col, unsigned Offset)
A generic error for subclass handlers that don't want or need to define their own error_category...
virtual std::error_code visitSourceRangeRecord(const Location &Start, const Location &End)
Visit a source range.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
std::error_code readDiagnostics(StringRef File)
Read the diagnostics in File.
virtual std::error_code visitDiagFlagRecord(unsigned ID, StringRef Name)
Visit a flag. This associates the flag's ID to a Name.
SerializedDiagnosticReader()
virtual std::error_code visitVersionRecord(unsigned Version)
Visit the version of the set of diagnostics.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
A base class that handles reading serialized diagnostics from a file.
virtual std::error_code visitFixitRecord(const Location &Start, const Location &End, StringRef Text)
Visit a fixit hint.
A location that is represented in the serialized diagnostics.
virtual std::error_code visitCategoryRecord(unsigned ID, StringRef Name)
Visit a category. This associates the category ID to a Name.
detail::InMemoryDirectory::const_iterator E
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.
const std::error_category & SDErrorCategory()
virtual std::error_code visitEndOfDiagnostic()
Visit the end of a diagnostic block.
virtual std::error_code visitDiagnosticRecord(unsigned Severity, const Location &Location, unsigned Category, unsigned Flag, StringRef Message)
Visit a diagnostic.