clang  6.0.0svn
Public Member Functions | Protected Member Functions | List of all members
clang::serialized_diags::SerializedDiagnosticReader Class Reference

A base class that handles reading serialized diagnostics from a file. More...

#include "clang/Frontend/SerializedDiagnosticReader.h"

Public Member Functions

 SerializedDiagnosticReader ()
 
virtual ~SerializedDiagnosticReader ()
 
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...
 

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

Definition at line 58 of file SerializedDiagnosticReader.h.

Constructor & Destructor Documentation

◆ SerializedDiagnosticReader()

clang::serialized_diags::SerializedDiagnosticReader::SerializedDiagnosticReader ( )
inline

Definition at line 60 of file SerializedDiagnosticReader.h.

◆ ~SerializedDiagnosticReader()

virtual clang::serialized_diags::SerializedDiagnosticReader::~SerializedDiagnosticReader ( )
inlinevirtual

Definition at line 61 of file SerializedDiagnosticReader.h.

Member Function Documentation

◆ readDiagnostics()

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

Read the diagnostics in File.

Definition at line 18 of file SerializedDiagnosticReader.cpp.

◆ visitCategoryRecord()

virtual std::error_code clang::serialized_diags::SerializedDiagnosticReader::visitCategoryRecord ( unsigned  ID,
StringRef  Name 
)
inlineprotectedvirtual

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

Definition at line 87 of file SerializedDiagnosticReader.h.

◆ visitDiagFlagRecord()

virtual std::error_code clang::serialized_diags::SerializedDiagnosticReader::visitDiagFlagRecord ( unsigned  ID,
StringRef  Name 
)
inlineprotectedvirtual

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

Definition at line 91 of file SerializedDiagnosticReader.h.

◆ visitDiagnosticRecord()

virtual std::error_code clang::serialized_diags::SerializedDiagnosticReader::visitDiagnosticRecord ( unsigned  Severity,
const Location Location,
unsigned  Category,
unsigned  Flag,
StringRef  Message 
)
inlineprotectedvirtual

Visit a diagnostic.

Definition at line 96 of file SerializedDiagnosticReader.h.

◆ visitEndOfDiagnostic()

virtual std::error_code clang::serialized_diags::SerializedDiagnosticReader::visitEndOfDiagnostic ( )
inlineprotectedvirtual

Visit the end of a diagnostic block.

Definition at line 85 of file SerializedDiagnosticReader.h.

◆ visitFilenameRecord()

virtual std::error_code clang::serialized_diags::SerializedDiagnosticReader::visitFilenameRecord ( unsigned  ID,
unsigned  Size,
unsigned  Timestamp,
StringRef  Name 
)
inlineprotectedvirtual

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

Definition at line 101 of file SerializedDiagnosticReader.h.

◆ visitFixitRecord()

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

Visit a fixit hint.

Definition at line 108 of file SerializedDiagnosticReader.h.

◆ visitSourceRangeRecord()

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

Visit a source range.

Definition at line 112 of file SerializedDiagnosticReader.h.

◆ visitStartOfDiagnostic()

virtual std::error_code clang::serialized_diags::SerializedDiagnosticReader::visitStartOfDiagnostic ( )
inlineprotectedvirtual

Visit the start of a diagnostic block.

Definition at line 81 of file SerializedDiagnosticReader.h.

◆ visitVersionRecord()

virtual std::error_code clang::serialized_diags::SerializedDiagnosticReader::visitVersionRecord ( unsigned  Version)
inlineprotectedvirtual

Visit the version of the set of diagnostics.

Definition at line 117 of file SerializedDiagnosticReader.h.


The documentation for this class was generated from the following files: