class CoroutineSuspendExpr

Declaration

class CoroutineSuspendExpr : public Expr { /* full declaration omitted */ };

Description

Represents an expression that might suspend coroutine execution; either a co_await or co_yield expression. Evaluation of this expression first evaluates its 'ready' expression. If that returns 'false': -- execution of the coroutine is suspended -- the 'suspend' expression is evaluated -- if the 'suspend' expression returns 'false', the coroutine is resumed -- otherwise, control passes back to the resumer. If the coroutine is not suspended, or when it is resumed, the 'resume' expression is evaluated, and its result is the result of the overall expression.

Declared at: clang/include/clang/AST/ExprCXX.h:4696

Inherits from: Expr

Member Variables

private clang::SourceLocation KeywordLoc
private clang::Stmt* [5] SubExprs
private clang::OpaqueValueExpr* OpaqueValue = nullptr

Inherited from Stmt:

protected

Method Overview

  • public CoroutineSuspendExpr(clang::Stmt::StmtClass SC, clang::SourceLocation KeywordLoc, clang::Expr * Operand, clang::Expr * Common, clang::Expr * Ready, clang::Expr * Suspend, clang::Expr * Resume, clang::OpaqueValueExpr * OpaqueValue)
  • public CoroutineSuspendExpr(clang::Stmt::StmtClass SC, clang::SourceLocation KeywordLoc, clang::QualType Ty, clang::Expr * Operand, clang::Expr * Common)
  • public CoroutineSuspendExpr(clang::Stmt::StmtClass SC, clang::Stmt::EmptyShell Empty)
  • public clang::Stmt::child_range children()
  • public clang::Stmt::const_child_range children() const
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::Expr * getCommonExpr() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getKeywordLoc() const
  • public clang::OpaqueValueExpr * getOpaqueValue() const
  • public clang::Expr * getOperand() const
  • public clang::Expr * getReadyExpr() const
  • public clang::Expr * getResumeExpr() const
  • public clang::Expr * getSuspendExpr() const

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

CoroutineSuspendExpr(
    clang::Stmt::StmtClass SC,
    clang::SourceLocation KeywordLoc,
    clang::Expr* Operand,
    clang::Expr* Common,
    clang::Expr* Ready,
    clang::Expr* Suspend,
    clang::Expr* Resume,
    clang::OpaqueValueExpr* OpaqueValue)

Declared at: clang/include/clang/AST/ExprCXX.h:4707

Parameters

clang::Stmt::StmtClass SC
clang::SourceLocation KeywordLoc
clang::Expr* Operand
clang::Expr* Common
clang::Expr* Ready
clang::Expr* Suspend
clang::Expr* Resume
clang::OpaqueValueExpr* OpaqueValue

CoroutineSuspendExpr(
    clang::Stmt::StmtClass SC,
    clang::SourceLocation KeywordLoc,
    clang::QualType Ty,
    clang::Expr* Operand,
    clang::Expr* Common)

Declared at: clang/include/clang/AST/ExprCXX.h:4721

Parameters

clang::Stmt::StmtClass SC
clang::SourceLocation KeywordLoc
clang::QualType Ty
clang::Expr* Operand
clang::Expr* Common

CoroutineSuspendExpr(
    clang::Stmt::StmtClass SC,
    clang::Stmt::EmptyShell Empty)

Declared at: clang/include/clang/AST/ExprCXX.h:4734

Parameters

clang::Stmt::StmtClass SC
clang::Stmt::EmptyShell Empty

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/ExprCXX.h:4774

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/ExprCXX.h:4778

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/ExprCXX.h:4782

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:4768

clang::Expr* getCommonExpr() const

Declared at: clang/include/clang/AST/ExprCXX.h:4742

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:4770

clang::SourceLocation getKeywordLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:4766

clang::OpaqueValueExpr* getOpaqueValue() const

Description

getOpaqueValue - Return the opaque value placeholder.

Declared at: clang/include/clang/AST/ExprCXX.h:4747

clang::Expr* getOperand() const

Declared at: clang/include/clang/AST/ExprCXX.h:4762

clang::Expr* getReadyExpr() const

Declared at: clang/include/clang/AST/ExprCXX.h:4749

clang::Expr* getResumeExpr() const

Declared at: clang/include/clang/AST/ExprCXX.h:4757

clang::Expr* getSuspendExpr() const

Declared at: clang/include/clang/AST/ExprCXX.h:4753