class ErrorReported

Declaration

class ErrorReported : public ErrorInfo { /* full declaration omitted */ };

Description

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 \c Error and always returns either \c ErrorReported or \c ErrorSuccess. 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 \c consumeError.

Declared at: llvm/lib/FileCheck/FileCheckImpl.h:594

Inherits from: ErrorInfo

Member Variables

public static char ID

Method Overview

Methods

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:598

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:603

Parameters

llvm::raw_ostream& OS

static inline llvm::Error reportedOrSuccess(
    bool HasErrorReported)

Declared at: llvm/lib/FileCheck/FileCheckImpl.h:607

Parameters

bool HasErrorReported