clang
9.0.0
|
#include "CoroutineStmtBuilder.h"
#include "clang/AST/ASTLambda.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/ScopeInfo.h"
#include "clang/Sema/SemaInternal.h"
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 Expr * | buildBuiltinCall (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 Expr * | maybeTailCall (Sema &S, QualType RetType, Expr *E, SourceLocation Loc) |
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 FunctionScopeInfo * | checkCoroutineContext (Sema &S, SourceLocation Loc, StringRef Keyword, bool IsImplicit=false) |
Check that this is a context in which a coroutine suspension can appear. More... | |
static bool | isWithinCatchScope (Scope *S) |
static void | checkSuspensionContext (Sema &S, SourceLocation Loc, StringRef Keyword) |
static Expr * | buildStdNoThrowDeclRef (Sema &S, SourceLocation Loc) |
Look up the std::nothrow object. More... | |
static FunctionDecl * | findDeleteForPromise (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 Expr * | castForMoving (Sema &S, Expr *E, QualType T=QualType()) |
static VarDecl * | buildVarDecl (Sema &S, SourceLocation Loc, QualType Type, IdentifierInfo *II) |
Build a variable declaration for move parameter. More... | |
|
static |
Definition at line 292 of file SemaCoroutine.cpp.
Referenced by diagReturnOnAllocFailure().
|
static |
Build calls to await_ready, await_suspend, and await_resume for a co_await expression.
Definition at line 399 of file SemaCoroutine.cpp.
|
static |
Definition at line 312 of file SemaCoroutine.cpp.
|
static |
Definition at line 346 of file SemaCoroutine.cpp.
|
static |
Build a call to 'operator co_await' if there is a suitable operator for the given expression.
Definition at line 275 of file SemaCoroutine.cpp.
References clang::UnresolvedSetImpl::append(), clang::Sema::CreateOverloadedUnaryOp(), clang::OverloadExpr::decls_begin(), and clang::OverloadExpr::decls_end().
|
static |
Definition at line 283 of file SemaCoroutine.cpp.
|
static |
Definition at line 252 of file SemaCoroutine.cpp.
|
static |
Definition at line 467 of file SemaCoroutine.cpp.
Referenced by clang::Sema::BuildCoreturnStmt(), and diagReturnOnAllocFailure().
|
static |
Look up the std::nothrow object.
Definition at line 901 of file SemaCoroutine.cpp.
Referenced by diagReturnOnAllocFailure().
|
static |
Build a variable declaration for move parameter.
Definition at line 1513 of file SemaCoroutine.cpp.
References clang::Sema::Context, clang::VarDecl::Create(), clang::Sema::CurContext, clang::ASTContext::getTrivialTypeSourceInfo(), clang::SC_None, and clang::Decl::setImplicit().
Referenced by clang::Sema::buildCoroutineParameterMoves().
Definition at line 1497 of file SemaCoroutine.cpp.
References clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildReferenceType(), clang::Sema::Context, clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::Expr::getType().
Referenced by clang::Sema::buildCoroutineParameterMoves().
|
static |
Check that this is a context in which a coroutine suspension can appear.
Definition at line 572 of file SemaCoroutine.cpp.
Referenced by clang::Sema::ActOnCoroutineBodyStart(), clang::Sema::BuildCoreturnStmt(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildResolvedCoawaitExpr(), and clang::Sema::BuildUnresolvedCoawaitExpr().
|
static |
Definition at line 679 of file SemaCoroutine.cpp.
|
static |
Definition at line 1050 of file SemaCoroutine.cpp.
References clang::Sema::ActOnCXXThis(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnFinishFullStmt(), clang::Sema::AFS_Both, clang::Sema::AFS_Class, clang::Sema::AFS_Global, clang::CoroutineBodyStmt::CtorArgs::Allocate, buildBuiltinCall(), clang::Sema::BuildCallExpr(), clang::Sema::BuildCoreturnStmt(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclRefExpr(), buildPromiseCall(), clang::Sema::BuildReturnStmt(), buildStdNoThrowDeclRef(), clang::sema::FunctionScopeInfo::CoroutinePromise, clang::Sema::CreateBuiltinUnaryOp(), clang::CoroutineBodyStmt::CtorArgs::Deallocate, clang::Sema::Diag(), clang::Sema::FindAllocationFunctions(), findDeleteForPromise(), clang::sema::FunctionScopeInfo::FirstCoroutineStmtLoc, clang::sema::FunctionScopeInfo::FirstSEHTryLoc, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Sema::getCurScope(), clang::Decl::getDeclContext(), clang::Expr::getExprLoc(), clang::sema::FunctionScopeInfo::getFirstCoroutineStmtKeyword(), clang::LookupResult::getFoundDecl(), clang::Preprocessor::getIdentifierInfo(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getRepresentativeDecl(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::isLambdaCallOperator(), clang::SourceLocation::isValid(), lookupMember(), clang::Sema::LookupMemberName, clang::Sema::LookupQualifiedName(), clang::None, clang::CoroutineBodyStmt::CtorArgs::OnException, clang::CoroutineBodyStmt::CtorArgs::OnFallthrough, clang::FunctionDecl::parameters(), clang::Sema::PP, clang::Sema::RequireCompleteType(), clang::CoroutineBodyStmt::CtorArgs::ReturnStmtOnAllocFailure, clang::CoroutineBodyStmt::CtorArgs::ReturnValue, and clang::VK_LValue.
|
static |
Definition at line 932 of file SemaCoroutine.cpp.
Referenced by diagReturnOnAllocFailure().
|
static |
Definition at line 186 of file SemaCoroutine.cpp.
Definition at line 651 of file SemaCoroutine.cpp.
|
static |
Look up the std::experimental::coroutine_handle<PromiseType>.
Definition at line 143 of file SemaCoroutine.cpp.
|
static |
Definition at line 30 of file SemaCoroutine.cpp.
Referenced by diagReturnOnAllocFailure().
|
static |
Definition at line 41 of file SemaCoroutine.cpp.
|
static |
Look up the std::coroutine_traits<...>::promise_type for the given function type.
Definition at line 50 of file SemaCoroutine.cpp.
|
static |
Definition at line 375 of file SemaCoroutine.cpp.
|
static |
Definition at line 1405 of file SemaCoroutine.cpp.
References clang::Sema::ActOnDeclStmt(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildReturnStmt(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::Context, clang::Sema::ConvertDeclToDeclGroup(), clang::VarDecl::Create(), clang::Sema::Diag(), clang::Sema::FinalizeDeclaration(), clang::sema::FunctionScopeInfo::FirstCoroutineStmtLoc, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::sema::FunctionScopeInfo::getFirstCoroutineStmtKeyword(), clang::Preprocessor::getIdentifierTable(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Expr::getType(), clang::InitializedEntity::InitializeResult(), clang::InitializedEntity::InitializeVariable(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isVoidType(), clang::Sema::PerformMoveOrCopyInitialization(), clang::Sema::PP, clang::CoroutineBodyStmt::CtorArgs::ResultDecl, clang::CoroutineBodyStmt::CtorArgs::ReturnValue, clang::SC_None, and clang::VK_LValue.