class ExprRequirement

Declaration

class ExprRequirement : public Requirement { /* full declaration omitted */ };

Description

A requires-expression requirement which queries the validity and properties of an expression ('simple' and 'compound' requirements).

Declared at: clang/include/clang/AST/ExprConcepts.h:260

Inherits from: Requirement

Member Variables

private llvm::PointerUnion<Expr*, SubstitutionDiagnostic*> Value
private clang::SourceLocation NoexceptLoc
private clang::concepts::ExprRequirement:: ReturnTypeRequirement TypeReq
private clang::ConceptSpecializationExpr* SubstitutedConstraintExpr
private clang::concepts::ExprRequirement:: SatisfactionStatus Status

Method Overview

Inherited from Requirement:

Methods

ExprRequirement(clang::Expr* E,
                bool IsSimple,
                clang::SourceLocation NoexceptLoc,
                clang::concepts::ExprRequirement::
                    ReturnTypeRequirement Req,
                clang::concepts::ExprRequirement::
                    SatisfactionStatus Status,
                clang::ConceptSpecializationExpr*
                    SubstitutedConstraintExpr =
                        nullptr)

Description

Construct a compound requirement.

Declared at: clang/include/clang/AST/ExprConcepts.h:349

Parameters

clang::Expr* E
the expression which is checked by this requirement.
bool IsSimple
whether this was a simple requirement in source.
clang::SourceLocation NoexceptLoc
the location of the noexcept keyword, if it was specified, otherwise an empty location.
clang::concepts::ExprRequirement:: ReturnTypeRequirement Req
the requirement for the type of the checked expression.
clang::concepts::ExprRequirement:: SatisfactionStatus Status
the satisfaction status of this requirement.
clang::ConceptSpecializationExpr* SubstitutedConstraintExpr = nullptr

ExprRequirement(
    clang::concepts::Requirement::
        SubstitutionDiagnostic* E,
    bool IsSimple,
    clang::SourceLocation NoexceptLoc,
    clang::concepts::ExprRequirement::
        ReturnTypeRequirement Req = {})

Description

Construct a compound requirement whose expression was a substitution failure. The requirement is not satisfied.

Declared at: clang/include/clang/AST/ExprConcepts.h:363

Parameters

clang::concepts::Requirement:: SubstitutionDiagnostic* E
the diagnostic emitted while instantiating the original expression.
bool IsSimple
whether this was a simple requirement in source.
clang::SourceLocation NoexceptLoc
the location of the noexcept keyword, if it was specified, otherwise an empty location.
clang::concepts::ExprRequirement:: ReturnTypeRequirement Req = {}
the requirement for the type of the checked expression (omit if no requirement was specified).

static bool classof(
    const clang::concepts::Requirement* R)

Declared at: clang/include/clang/AST/ExprConcepts.h:402

Parameters

const clang::concepts::Requirement* R

clang::Expr* getExpr() const

Declared at: clang/include/clang/AST/ExprConcepts.h:395

clang::concepts::Requirement::
    SubstitutionDiagnostic*
    getExprSubstitutionDiagnostic() const

Declared at: clang/include/clang/AST/ExprConcepts.h:388

clang::SourceLocation getNoexceptLoc() const

Declared at: clang/include/clang/AST/ExprConcepts.h:370

const clang::concepts::ExprRequirement::
    ReturnTypeRequirement&
    getReturnTypeRequirement() const

Declared at: clang/include/clang/AST/ExprConcepts.h:378

clang::ConceptSpecializationExpr*
getReturnTypeRequirementSubstitutedConstraintExpr()
    const

Declared at: clang/include/clang/AST/ExprConcepts.h:383

clang::concepts::ExprRequirement::
    SatisfactionStatus
    getSatisfactionStatus() const

Declared at: clang/include/clang/AST/ExprConcepts.h:372

bool hasNoexceptRequirement() const

Declared at: clang/include/clang/AST/ExprConcepts.h:369

bool isCompound() const

Declared at: clang/include/clang/AST/ExprConcepts.h:367

bool isExprSubstitutionFailure() const

Declared at: clang/include/clang/AST/ExprConcepts.h:374

bool isSimple() const

Declared at: clang/include/clang/AST/ExprConcepts.h:366