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/FileCheck/FileCheckImpl.h:536
Inherits from: ErrorInfo
Member Variables
- private llvm::SMDiagnostic Diagnostic
- private llvm::SMRange Range
- public static char ID
Method Overview
- public ErrorDiagnostic(llvm::SMDiagnostic && Diag, llvm::SMRange Range)
- public std::error_code convertToErrorCode() const
- public static llvm::Error get(const llvm::SourceMgr & SM, llvm::SMLoc Loc, const llvm::Twine & ErrMsg, llvm::SMRange Range = None)
- public static llvm::Error get(const llvm::SourceMgr & SM, llvm::StringRef Buffer, const llvm::Twine & ErrMsg)
- public llvm::StringRef getMessage() const
- public llvm::SMRange getRange() const
- public void log(llvm::raw_ostream & OS) const
Methods
¶ErrorDiagnostic(llvm::SMDiagnostic&& Diag,
llvm::SMRange Range)
ErrorDiagnostic(llvm::SMDiagnostic&& Diag,
llvm::SMRange Range)
Declared at: llvm/lib/FileCheck/FileCheckImpl.h:544
Parameters
- llvm::SMDiagnostic&& Diag
- llvm::SMRange Range
¶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/FileCheck/FileCheckImpl.h:547
¶static llvm::Error get(const llvm::SourceMgr& SM,
llvm::SMLoc Loc,
const llvm::Twine& ErrMsg,
llvm::SMRange Range = None)
static llvm::Error get(const llvm::SourceMgr& SM,
llvm::SMLoc Loc,
const llvm::Twine& ErrMsg,
llvm::SMRange Range = None)
Declared at: llvm/lib/FileCheck/FileCheckImpl.h:557
Parameters
- const llvm::SourceMgr& SM
- llvm::SMLoc Loc
- const llvm::Twine& ErrMsg
- llvm::SMRange Range = None
¶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/FileCheck/FileCheckImpl.h:563
Parameters
- const llvm::SourceMgr& SM
- llvm::StringRef Buffer
- const llvm::Twine& ErrMsg
¶llvm::StringRef getMessage() const
llvm::StringRef getMessage() const
Declared at: llvm/lib/FileCheck/FileCheckImpl.h:554
¶llvm::SMRange getRange() const
llvm::SMRange getRange() const
Declared at: llvm/lib/FileCheck/FileCheckImpl.h:555
¶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/FileCheck/FileCheckImpl.h:552