class CoroutineStmtBuilder
Declaration
class CoroutineStmtBuilder : public CtorArgs { /* full declaration omitted */ };
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:24
Inherits from: CoroutineBodyStmt::CtorArgs
Member Variables
- private clang::Sema& S
- private clang::FunctionDecl& FD
- private sema::FunctionScopeInfo& Fn
- private bool IsValid = true
- private clang::SourceLocation Loc
- private SmallVector<clang::Stmt*, 4> ParamMovesVector
- private const bool IsPromiseDependentType
- private clang::CXXRecordDecl* PromiseRecordDecl = nullptr
Inherited from CoroutineBodyStmt::CtorArgs:
- public Body = nullptr
- public Promise = nullptr
- public InitialSuspend = nullptr
- public FinalSuspend = nullptr
- public OnException = nullptr
- public OnFallthrough = nullptr
- public Allocate = nullptr
- public Deallocate = nullptr
- public ReturnValue = nullptr
- public ReturnStmt = nullptr
- public ReturnStmtOnAllocFailure = nullptr
- public ParamMoves
Method Overview
- public CoroutineStmtBuilder(clang::Sema & S, clang::FunctionDecl & FD, sema::FunctionScopeInfo & Fn, clang::Stmt * Body)
- public bool buildDependentStatements()
- public bool buildStatements()
- public bool isInvalid() const
- private bool makeGroDeclAndReturnStmt()
- private bool makeInitialAndFinalSuspend()
- private bool makeNewAndDeleteExpr()
- private bool makeOnException()
- private bool makeOnFallthrough()
- private bool makePromiseStmt()
- private bool makeReturnObject()
- private bool makeReturnOnAllocFailure()
Methods
¶CoroutineStmtBuilder(clang::Sema& S,
clang::FunctionDecl& FD,
sema::FunctionScopeInfo& Fn,
clang::Stmt* Body)
CoroutineStmtBuilder(clang::Sema& S,
clang::FunctionDecl& FD,
sema::FunctionScopeInfo& Fn,
clang::Stmt* Body)
Description
Construct a CoroutineStmtBuilder and initialize the promise statement and initial/final suspends from the FunctionScopeInfo.
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:37
Parameters
- clang::Sema& S
- clang::FunctionDecl& FD
- sema::FunctionScopeInfo& Fn
- clang::Stmt* Body
¶bool buildDependentStatements()
bool buildDependentStatements()
Description
Build the coroutine body statements that require a non-dependent promise type in order to construct. For example different new/delete overloads are selected depending on if the promise type provides `unhandled_exception()`, and therefore they cannot be built until the promise type is complete so that we can perform name lookup.
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:51
¶bool buildStatements()
bool buildStatements()
Description
Build the coroutine body statements, including the "promise dependent" statements when the promise type is not dependent.
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:42
¶bool isInvalid() const
bool isInvalid() const
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:53
¶bool makeGroDeclAndReturnStmt()
bool makeGroDeclAndReturnStmt()
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:62
¶bool makeInitialAndFinalSuspend()
bool makeInitialAndFinalSuspend()
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:57
¶bool makeNewAndDeleteExpr()
bool makeNewAndDeleteExpr()
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:58
¶bool makeOnException()
bool makeOnException()
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:60
¶bool makeOnFallthrough()
bool makeOnFallthrough()
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:59
¶bool makePromiseStmt()
bool makePromiseStmt()
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:56
¶bool makeReturnObject()
bool makeReturnObject()
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:61
¶bool makeReturnOnAllocFailure()
bool makeReturnOnAllocFailure()
Declared at: clang/lib/Sema/CoroutineStmtBuilder.h:63