LLVM: llvm::ErrorReported Class Reference (original) (raw)

An error that has already been reported. More...

#include "[FileCheck/FileCheckImpl.h](FileCheckImpl%5F8h%5Fsource.html)"

Public Member Functions
std::error_code convertToErrorCode () const override
Convert this error to a std::error_code.
void log (raw_ostream &OS) const override
Print diagnostic associated with this error when printing the error.
Public Member Functions inherited from llvm::ErrorInfo< ErrorReported >
const void * dynamicClassID () const override
bool isA (const void *const ClassID) const override
Public Member Functions inherited from llvm::ErrorInfoBase
virtual ~ErrorInfoBase ()=default
virtual std::string message () const
Return the error message as a string.
template
bool isA () const
Static Public Member Functions
static Error reportedOrSuccess (bool HasErrorReported)
Static Public Member Functions inherited from llvm::ErrorInfo< ErrorReported >
static const void * classID ()
Static Public Member Functions inherited from llvm::ErrorInfoBase
static const void * classID ()
Static Public Attributes
static char ID = 0

An error that has already been reported.

This class is designed to support a function whose callers may need to know whether the function encountered and reported an error but never need to know the nature of that error. For example, the function has a return type of [Error](classllvm%5F1%5F1Error.html "Lightweight error class with error context and mandatory checking.") and always returns either [ErrorReported](classllvm%5F1%5F1ErrorReported.html "An error that has already been reported.") or [ErrorSuccess](classllvm%5F1%5F1ErrorSuccess.html "Subclass of Error for the sole purpose of identifying the success path in the type system."). That interface is similar to that of a function returning bool to indicate an error except, in the former case, (1) there is no confusion over polarity and (2) the caller must either check the result or explicitly ignore it with a call like consumeError.

Definition at line 567 of file FileCheckImpl.h.

convertToErrorCode()

std::error_code llvm::ErrorReported::convertToErrorCode ( ) const inlineoverridevirtual

log()

void llvm::ErrorReported::log ( raw_ostream & OS) const inlineoverridevirtual

reportedOrSuccess()

Error llvm::ErrorReported::reportedOrSuccess ( bool HasErrorReported) inlinestatic

ID

char ErrorReported::ID = 0 static

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