clang  3.9.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::CoreturnStmt Class Reference

Represents a 'co_return' statement in the C++ Coroutines TS. More...

#include <StmtCXX.h>

Inheritance diagram for clang::CoreturnStmt:
[legend]
Collaboration diagram for clang::CoreturnStmt:
[legend]

Public Member Functions

 CoreturnStmt (SourceLocation CoreturnLoc, Stmt *Operand, Stmt *PromiseCall)
 
SourceLocation getKeywordLoc () const
 
ExprgetOperand () const
 Retrieve the operand of the 'co_return' statement. More...
 
ExprgetPromiseCall () const
 Retrieve the promise call that results from this 'co_return' statement. More...
 
SourceLocation getLocStart () const LLVM_READONLY
 
SourceLocation getLocEnd () const LLVM_READONLY
 
child_range children ()
 

Static Public Member Functions

static bool classof (const Stmt *T)
 

Friends

class ASTStmtReader
 

Detailed 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".

Definition at line 379 of file StmtCXX.h.

Constructor & Destructor Documentation

clang::CoreturnStmt::CoreturnStmt ( SourceLocation  CoreturnLoc,
Stmt Operand,
Stmt PromiseCall 
)
inline

Definition at line 387 of file StmtCXX.h.

Member Function Documentation

child_range clang::CoreturnStmt::children ( )
inline

Definition at line 411 of file StmtCXX.h.

References clang::LangAS::Count.

static bool clang::CoreturnStmt::classof ( const Stmt T)
inlinestatic

Definition at line 415 of file StmtCXX.h.

SourceLocation clang::CoreturnStmt::getKeywordLoc ( ) const
inline

Definition at line 393 of file StmtCXX.h.

SourceLocation clang::CoreturnStmt::getLocEnd ( ) const
inline

Definition at line 407 of file StmtCXX.h.

References getOperand().

SourceLocation clang::CoreturnStmt::getLocStart ( ) const
inline

Definition at line 406 of file StmtCXX.h.

Expr* clang::CoreturnStmt::getOperand ( ) const
inline

Retrieve the operand of the 'co_return' statement.

Will be nullptr if none was specified.

Definition at line 397 of file StmtCXX.h.

Referenced by getLocEnd().

Expr* clang::CoreturnStmt::getPromiseCall ( ) const
inline

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.

Definition at line 402 of file StmtCXX.h.

Friends And Related Function Documentation

friend class ASTStmtReader
friend

Definition at line 385 of file StmtCXX.h.


The documentation for this class was generated from the following file: