class ErrorDiagnostic
Declaration
class ErrorDiagnostic : public ErrorInfo { /* full declaration omitted */ };
Description
Class to represent an error holding a diagnostic with location information used when printing it.
Declared at: llvm/lib/Support/FileCheckImpl.h:318
Inherits from: ErrorInfo
Member Variables
- public static char ID
Method Overview
- public ErrorDiagnostic(llvm::SMDiagnostic && Diag)
- public std::error_code convertToErrorCode() const
- public static llvm::Error get(const llvm::SourceMgr & SM, llvm::SMLoc Loc, const llvm::Twine & ErrMsg)
- public static llvm::Error get(const llvm::SourceMgr & SM, llvm::StringRef Buffer, const llvm::Twine & ErrMsg)
- public void log(llvm::raw_ostream & OS) const
Methods
¶ErrorDiagnostic(llvm::SMDiagnostic&& Diag)
ErrorDiagnostic(llvm::SMDiagnostic&& Diag)
Declared at: llvm/lib/Support/FileCheckImpl.h:325
Parameters
- llvm::SMDiagnostic&& Diag
¶std::error_code convertToErrorCode() const
std::error_code convertToErrorCode() const
Description
Convert this error to a std::error_code. This is a temporary crutch to enable interaction with code still using std::error_code. It will be removed in the future.
Declared at: llvm/lib/Support/FileCheckImpl.h:327
¶static llvm::Error get(const llvm::SourceMgr& SM,
llvm::SMLoc Loc,
const llvm::Twine& ErrMsg)
static llvm::Error get(const llvm::SourceMgr& SM,
llvm::SMLoc Loc,
const llvm::Twine& ErrMsg)
Declared at: llvm/lib/Support/FileCheckImpl.h:334
Parameters
- const llvm::SourceMgr& SM
- llvm::SMLoc Loc
- const llvm::Twine& ErrMsg
¶static llvm::Error get(const llvm::SourceMgr& SM,
llvm::StringRef Buffer,
const llvm::Twine& ErrMsg)
static llvm::Error get(const llvm::SourceMgr& SM,
llvm::StringRef Buffer,
const llvm::Twine& ErrMsg)
Declared at: llvm/lib/Support/FileCheckImpl.h:339
Parameters
- const llvm::SourceMgr& SM
- llvm::StringRef Buffer
- const llvm::Twine& ErrMsg
¶void log(llvm::raw_ostream& OS) const
void log(llvm::raw_ostream& OS) const
Description
Print diagnostic associated with this error when printing the error.
Declared at: llvm/lib/Support/FileCheckImpl.h:332