clang  5.0.0
Classes | Functions
SemaCoroutine.cpp File Reference
#include "CoroutineStmtBuilder.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 "clang/Sema/SemaInternal.h"
Include dependency graph for SemaCoroutine.cpp:

Go to the source code of this file.

Classes

struct  ReadySuspendResumeResult
 

Functions

static LookupResult lookupMember (Sema &S, const char *Name, CXXRecordDecl *RD, SourceLocation Loc, bool &Res)
 
static bool lookupMember (Sema &S, const char *Name, CXXRecordDecl *RD, SourceLocation Loc)
 
static QualType lookupPromiseType (Sema &S, const FunctionDecl *FD, SourceLocation KwLoc)
 Look up the std::coroutine_traits<...>::promise_type for the given function type. More...
 
static QualType lookupCoroutineHandleType (Sema &S, QualType PromiseType, SourceLocation Loc)
 Look up the std::experimental::coroutine_handle<PromiseType>. More...
 
static bool isValidCoroutineContext (Sema &S, SourceLocation Loc, StringRef Keyword)
 
static ExprResult buildOperatorCoawaitLookupExpr (Sema &SemaRef, Scope *S, SourceLocation Loc)
 
static ExprResult buildOperatorCoawaitCall (Sema &SemaRef, SourceLocation Loc, Expr *E, UnresolvedLookupExpr *Lookup)
 Build a call to 'operator co_await' if there is a suitable operator for the given expression. More...
 
static ExprResult buildOperatorCoawaitCall (Sema &SemaRef, Scope *S, SourceLocation Loc, Expr *E)
 
static ExprbuildBuiltinCall (Sema &S, SourceLocation Loc, Builtin::ID Id, MultiExprArg CallArgs)
 
static ExprResult buildCoroutineHandle (Sema &S, QualType PromiseType, SourceLocation Loc)
 
static ExprResult buildMemberCall (Sema &S, Expr *Base, SourceLocation Loc, StringRef Name, MultiExprArg Args)
 
static ReadySuspendResumeResult buildCoawaitCalls (Sema &S, VarDecl *CoroPromise, 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, VarDecl *Promise, SourceLocation Loc, StringRef Name, MultiExprArg Args)
 
static FunctionScopeInfocheckCoroutineContext (Sema &S, SourceLocation Loc, StringRef Keyword, bool IsImplicit=false)
 Check that this is a context in which a coroutine suspension can appear. More...
 
static ExprbuildStdNoThrowDeclRef (Sema &S, SourceLocation Loc)
 Look up the std::nothrow object. More...
 
static FunctionDeclfindDeleteForPromise (Sema &S, SourceLocation Loc, QualType PromiseType)
 
static bool diagReturnOnAllocFailure (Sema &S, Expr *E, CXXRecordDecl *PromiseRecordDecl, FunctionScopeInfo &Fn)
 
static void noteMemberDeclaredHere (Sema &S, Expr *E, FunctionScopeInfo &Fn)
 
static ExprcastForMoving (Sema &S, Expr *E, QualType T=QualType())
 
static VarDeclbuildVarDecl (Sema &S, SourceLocation Loc, QualType Type, IdentifierInfo *II)
 Build a variable declaration for move parameter. More...
 

Function Documentation

static Expr* buildBuiltinCall ( Sema S,
SourceLocation  Loc,
Builtin::ID  Id,
MultiExprArg  CallArgs 
)
static
static ReadySuspendResumeResult buildCoawaitCalls ( Sema S,
VarDecl CoroPromise,
SourceLocation  Loc,
Expr E 
)
static
static ExprResult buildCoroutineHandle ( Sema S,
QualType  PromiseType,
SourceLocation  Loc 
)
static
static ExprResult buildMemberCall ( Sema S,
Expr Base,
SourceLocation  Loc,
StringRef  Name,
MultiExprArg  Args 
)
static
static ExprResult buildOperatorCoawaitCall ( Sema SemaRef,
SourceLocation  Loc,
Expr E,
UnresolvedLookupExpr Lookup 
)
static
static ExprResult buildOperatorCoawaitCall ( Sema SemaRef,
Scope S,
SourceLocation  Loc,
Expr E 
)
static
static ExprResult buildOperatorCoawaitLookupExpr ( Sema SemaRef,
Scope S,
SourceLocation  Loc 
)
static
static ExprResult buildPromiseCall ( Sema S,
VarDecl Promise,
SourceLocation  Loc,
StringRef  Name,
MultiExprArg  Args 
)
static
static Expr* buildStdNoThrowDeclRef ( Sema S,
SourceLocation  Loc 
)
static
static VarDecl* buildVarDecl ( Sema S,
SourceLocation  Loc,
QualType  Type,
IdentifierInfo II 
)
static
static Expr* castForMoving ( Sema S,
Expr E,
QualType  T = QualType() 
)
static
static FunctionScopeInfo* checkCoroutineContext ( Sema S,
SourceLocation  Loc,
StringRef  Keyword,
bool  IsImplicit = false 
)
static
static bool diagReturnOnAllocFailure ( Sema S,
Expr E,
CXXRecordDecl PromiseRecordDecl,
FunctionScopeInfo Fn 
)
static
static FunctionDecl* findDeleteForPromise ( Sema S,
SourceLocation  Loc,
QualType  PromiseType 
)
static
static bool isValidCoroutineContext ( Sema S,
SourceLocation  Loc,
StringRef  Keyword 
)
static
static QualType lookupCoroutineHandleType ( Sema S,
QualType  PromiseType,
SourceLocation  Loc 
)
static
static LookupResult lookupMember ( Sema S,
const char *  Name,
CXXRecordDecl RD,
SourceLocation  Loc,
bool Res 
)
static
static bool lookupMember ( Sema S,
const char *  Name,
CXXRecordDecl RD,
SourceLocation  Loc 
)
static

Definition at line 37 of file SemaCoroutine.cpp.

References lookupMember().

static QualType lookupPromiseType ( Sema S,
const FunctionDecl FD,
SourceLocation  KwLoc 
)
static
static void noteMemberDeclaredHere ( Sema S,
Expr E,
FunctionScopeInfo Fn 
)
static