struct ExpressionFormat

Declaration

struct ExpressionFormat { /* full declaration omitted */ };

Description

Type representing the format an expression value should be textualized into for matching. Used to represent both explicit format specifiers as well as implicit format from using numeric variables.

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

Member Variables

private llvm::ExpressionFormat::Kind Value
private unsigned int Precision = 0
private bool AlternateForm = false
printf-like "alternate form" selected.

Method Overview

Methods

ExpressionFormat()

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

ExpressionFormat(
    llvm::ExpressionFormat::Kind Value)

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

Parameters

llvm::ExpressionFormat::Kind Value

ExpressionFormat(
    llvm::ExpressionFormat::Kind Value,
    unsigned int Precision)

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

Parameters

llvm::ExpressionFormat::Kind Value
unsigned int Precision

ExpressionFormat(
    llvm::ExpressionFormat::Kind Value,
    unsigned int Precision,
    bool AlternateForm)

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

Parameters

llvm::ExpressionFormat::Kind Value
unsigned int Precision
bool AlternateForm

Expected<std::string> getMatchingString(
    llvm::ExpressionValue Value) const

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

Parameters

llvm::ExpressionValue Value

Returns

the string representation of \p Value in the format represented by this instance, or an error if conversion to this format failed or the format is NoFormat.

Expected<std::string> getWildcardRegex() const

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

Returns

a wildcard regular expression string that matches any value in the format represented by this instance and no other value, or an error if the format is NoFormat.

bool operator bool() const

Description

Evaluates a format to true if it can be used in a match.

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

llvm::StringRef toString() const

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

Returns

the format specifier corresponding to this format as a string.

Expected<llvm::ExpressionValue>
valueFromStringRepr(
    llvm::StringRef StrVal,
    const llvm::SourceMgr& SM) const

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

Parameters

llvm::StringRef StrVal
const llvm::SourceMgr& SM

Returns

the value corresponding to string representation \p StrVal according to the matching format represented by this instance or an error with diagnostic against \p SM if \p StrVal does not correspond to a valid and representable value.