class CoreturnStmt
Declaration
class CoreturnStmt : public Stmt { /* full declaration omitted */ };
Description
Represents a 'co_return' statement in the C++ Coroutines TS. This statament models the initialization of the coroutine promise (encapsulating the eventual notional return value) from an expression (or braced-init-list), followed by termination of the coroutine. This initialization is modeled by the evaluation of the operand followed by a call to one of: <promise >.return_value( <operand >) <promise >.return_void() which we name the "promise call".
Declared at: clang/include/clang/AST/StmtCXX.h:458
Inherits from: Stmt
Member Variables
- private clang::SourceLocation CoreturnLoc
- private clang::Stmt* [2] SubStmts
- private bool IsImplicit
Inherited from Stmt:
Method Overview
- public CoreturnStmt(clang::SourceLocation CoreturnLoc, clang::Stmt * Operand, clang::Stmt * PromiseCall, bool IsImplicit = false)
- public CoreturnStmt(clang::Stmt::EmptyShell)
- 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::SourceLocation getEndLoc() const
- public clang::SourceLocation getKeywordLoc() const
- public clang::Expr * getOperand() const
- public clang::Expr * getPromiseCall() const
- public bool isImplicit() const
- public void setIsImplicit(bool value = true)
Inherited from Stmt:
- public EnableStatistics
- public IgnoreContainers
- public IgnoreContainers
- public PrintStats
- public ProcessODRHash
- public Profile
- public addStmtClass
- public child_begin
- public child_begin
- public child_end
- public child_end
- public children
- public children
- public determineLikelihoodConflict
- public dump
- public dump
- public dumpColor
- public dumpPretty
- public getBeginLoc
- public getEndLoc
- public getID
- public getLikelihood
- public getLikelihood
- public getLikelihood
- public getLikelihoodAttr
- public getSourceRange
- public getStmtClass
- public getStmtClassName
- public printJson
- public printPretty
- public printPrettyControlled
- public stripLabelLikeStatements
- public stripLabelLikeStatements
- public viewAST
Methods
¶CoreturnStmt(clang::SourceLocation CoreturnLoc,
clang::Stmt* Operand,
clang::Stmt* PromiseCall,
bool IsImplicit = false)
CoreturnStmt(clang::SourceLocation CoreturnLoc,
clang::Stmt* Operand,
clang::Stmt* PromiseCall,
bool IsImplicit = false)
Declared at: clang/include/clang/AST/StmtCXX.h:468
Parameters
- clang::SourceLocation CoreturnLoc
- clang::Stmt* Operand
- clang::Stmt* PromiseCall
- bool IsImplicit = false
¶CoreturnStmt(clang::Stmt::EmptyShell)
CoreturnStmt(clang::Stmt::EmptyShell)
Declared at: clang/include/clang/AST/StmtCXX.h:476
Parameters
¶clang::Stmt::child_range children()
clang::Stmt::child_range children()
Declared at: clang/include/clang/AST/StmtCXX.h:499
¶clang::Stmt::const_child_range children() const
clang::Stmt::const_child_range children() const
Declared at: clang/include/clang/AST/StmtCXX.h:503
¶static bool classof(const clang::Stmt* T)
static bool classof(const clang::Stmt* T)
Declared at: clang/include/clang/AST/StmtCXX.h:507
Parameters
- const clang::Stmt* T
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/AST/StmtCXX.h:494
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/StmtCXX.h:495
¶clang::SourceLocation getKeywordLoc() const
clang::SourceLocation getKeywordLoc() const
Declared at: clang/include/clang/AST/StmtCXX.h:478
¶clang::Expr* getOperand() const
clang::Expr* getOperand() const
Description
Retrieve the operand of the 'co_return' statement. Will be nullptr if none was specified.
Declared at: clang/include/clang/AST/StmtCXX.h:482
¶clang::Expr* getPromiseCall() const
clang::Expr* getPromiseCall() const
Description
Retrieve the promise call that results from this 'co_return' statement. Will be nullptr if either the coroutine has not yet been finalized or the coroutine has no eventual return type.
Declared at: clang/include/clang/AST/StmtCXX.h:487
¶bool isImplicit() const
bool isImplicit() const
Declared at: clang/include/clang/AST/StmtCXX.h:491
¶void setIsImplicit(bool value = true)
void setIsImplicit(bool value = true)
Declared at: clang/include/clang/AST/StmtCXX.h:492
Parameters
- bool value = true