clang  3.9.0
Classes | Functions
SemaCoroutine.cpp File Reference
#include "clang/Sema/SemaInternal.h"
#include "clang/AST/Decl.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/StmtCXX.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Overload.h"
Include dependency graph for SemaCoroutine.cpp:

Go to the source code of this file.

Classes

struct  ReadySuspendResumeResult
 

Functions

static QualType lookupPromiseType (Sema &S, const FunctionProtoType *FnType, SourceLocation Loc)
 Look up the std::coroutine_traits<...>::promise_type for the given function type. More...
 
static FunctionScopeInfocheckCoroutineContext (Sema &S, SourceLocation Loc, StringRef Keyword)
 Check that this is a context in which a coroutine suspension can appear. More...
 
static ExprResult buildOperatorCoawaitCall (Sema &SemaRef, Scope *S, SourceLocation Loc, Expr *E)
 Build a call to 'operator co_await' if there is a suitable operator for the given expression. More...
 
static ExprResult buildMemberCall (Sema &S, Expr *Base, SourceLocation Loc, StringRef Name, MutableArrayRef< Expr * > Args)
 
static ReadySuspendResumeResult buildCoawaitCalls (Sema &S, SourceLocation Loc, Expr *E)
 Build calls to await_ready, await_suspend, and await_resume for a co_await expression. More...
 
static ExprResult buildPromiseCall (Sema &S, FunctionScopeInfo *Coroutine, SourceLocation Loc, StringRef Name, MutableArrayRef< Expr * > Args)
 

Function Documentation

static ReadySuspendResumeResult buildCoawaitCalls ( Sema S,
SourceLocation  Loc,
Expr E 
)
static
static ExprResult buildMemberCall ( Sema S,
Expr Base,
SourceLocation  Loc,
StringRef  Name,
MutableArrayRef< Expr * >  Args 
)
static
static ExprResult buildOperatorCoawaitCall ( Sema SemaRef,
Scope S,
SourceLocation  Loc,
Expr E 
)
static

Build a call to 'operator co_await' if there is a suitable operator for the given expression.

Definition at line 162 of file SemaCoroutine.cpp.

References clang::Sema::CreateOverloadedUnaryOp(), clang::Expr::getType(), and clang::Sema::LookupOverloadedOperatorName().

Referenced by clang::Sema::ActOnCoawaitExpr(), and clang::Sema::ActOnCoyieldExpr().

static ExprResult buildPromiseCall ( Sema S,
FunctionScopeInfo Coroutine,
SourceLocation  Loc,
StringRef  Name,
MutableArrayRef< Expr * >  Args 
)
static
static FunctionScopeInfo* checkCoroutineContext ( Sema S,
SourceLocation  Loc,
StringRef  Keyword 
)
static
static QualType lookupPromiseType ( Sema S,
const FunctionProtoType FnType,
SourceLocation  Loc 
)
static