10 #ifndef LLVM_CLANG_BASIC_DIAGNOSTIC_ERROR_H 11 #define LLVM_CLANG_BASIC_DIAGNOSTIC_ERROR_H 14 #include "llvm/Support/Error.h" 25 void log(raw_ostream &OS)
const override { OS <<
"clang diagnostic"; }
33 return llvm::make_error<DiagnosticError>(
52 std::error_code convertToErrorCode()
const override {
53 return llvm::inconvertibleErrorCode();
61 #endif // LLVM_CLANG_BASIC_DIAGNOSTIC_ERROR_H void log(raw_ostream &OS) const override
static Optional< PartialDiagnosticAt > take(llvm::Error &Err)
Extracts and returns the diagnostic payload from the given Error if the error is a DiagnosticError...
PartialDiagnosticAt & getDiagnostic()
Carries a Clang diagnostic in an llvm::Error.
The result type of a method or function.
Encodes a location in the source.
std::pair< SourceLocation, PartialDiagnostic > PartialDiagnosticAt
A partial diagnostic along with the source location where this diagnostic occurs. ...
DiagnosticError(PartialDiagnosticAt Diag)
Dataflow Directional Tag Classes.
Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream...
const PartialDiagnosticAt & getDiagnostic() const
static llvm::Error create(SourceLocation Loc, PartialDiagnostic Diag)
Creates a new DiagnosticError that contains the given diagnostic at the given location.