|
clang
5.0.0
|
#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"Go to the source code of this file.
Classes | |
| struct | ReadySuspendResumeResult |
|
static |
Definition at line 296 of file SemaCoroutine.cpp.
References clang::Sema::ActOnCallExpr(), clang::Sema::BuildDeclRefExpr(), clang::ASTContext::BuiltinInfo, clang::Sema::Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Builtin::Context::getName(), clang::ASTContext::Idents, clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, Name, clang::Sema::TUScope, and clang::VK_LValue.
Referenced by buildCoroutineHandle().
|
static |
Build calls to await_ready, await_suspend, and await_resume for a co_await expression.
Definition at line 368 of file SemaCoroutine.cpp.
References clang::ASTContext::BoolTy, buildCoroutineHandle(), buildMemberCall(), clang::Sema::Context, clang::Sema::Diag(), E, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CallExpr::getCalleeDecl(), clang::CallExpr::getCallReturnType(), clang::CallExpr::getDirectCallee(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::Expr::getObjectKind(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), I, clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), ReadySuspendResumeResult::IsInvalid, clang::Type::isReferenceType(), clang::None, clang::Sema::PerformContextuallyConvertToBool(), Result, ReadySuspendResumeResult::Results, clang::VK_LValue, and clang::ASTContext::VoidTy.
Referenced by clang::Sema::BuildCoyieldExpr(), and clang::Sema::BuildResolvedCoawaitExpr().
|
static |
Definition at line 316 of file SemaCoroutine.cpp.
References clang::Sema::ActOnCallExpr(), buildBuiltinCall(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::computeDeclContext(), clang::Sema::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), lookupCoroutineHandleType(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), and clang::Sema::PP.
Referenced by buildCoawaitCalls().
|
static |
Definition at line 350 of file SemaCoroutine.cpp.
References clang::Sema::ActOnCallExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::PP, and Result.
Referenced by buildCoawaitCalls(), and buildPromiseCall().
|
static |
Build a call to 'operator co_await' if there is a suitable operator for the given expression.
Definition at line 279 of file SemaCoroutine.cpp.
References clang::UnresolvedSetImpl::append(), clang::Sema::CreateOverloadedUnaryOp(), clang::OverloadExpr::decls_begin(), and clang::OverloadExpr::decls_end().
Referenced by clang::Sema::ActOnCoroutineBodyStart(), clang::Sema::ActOnCoyieldExpr(), buildOperatorCoawaitCall(), and clang::Sema::BuildUnresolvedCoawaitExpr().
|
static |
Definition at line 287 of file SemaCoroutine.cpp.
References buildOperatorCoawaitCall(), buildOperatorCoawaitLookupExpr(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().
|
static |
Definition at line 256 of file SemaCoroutine.cpp.
References clang::LookupResult::asUnresolvedSet(), clang::Sema::Context, clang::UnresolvedLookupExpr::Create(), clang::ASTContext::DeclarationNames, clang::DeclarationNameTable::getCXXOperatorName(), clang::LookupResult::isAmbiguous(), IsOverloaded(), clang::Sema::LookupName(), and clang::Sema::LookupOperatorName.
Referenced by clang::Sema::ActOnCoawaitExpr(), and buildOperatorCoawaitCall().
|
static |
Definition at line 431 of file SemaCoroutine.cpp.
References clang::Sema::BuildDeclRefExpr(), buildMemberCall(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), Name, and clang::VK_LValue.
Referenced by clang::Sema::ActOnCoroutineBodyStart(), clang::Sema::ActOnCoyieldExpr(), clang::Sema::BuildCoreturnStmt(), and clang::Sema::BuildUnresolvedCoawaitExpr().
|
static |
Look up the std::nothrow object.
Definition at line 734 of file SemaCoroutine.cpp.
References clang::Sema::BuildDeclRefExpr(), clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::Decl::getLocation(), clang::Sema::getStdNamespace(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::Sema::PP, Result, and clang::VK_LValue.
|
static |
Build a variable declaration for move parameter.
Definition at line 1278 of file SemaCoroutine.cpp.
References clang::Sema::Context, clang::VarDecl::Create(), clang::Sema::CurContext, clang::ASTContext::getTrivialTypeSourceInfo(), clang::SC_None, and clang::Decl::setImplicit().
Definition at line 1261 of file SemaCoroutine.cpp.
References clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildReferenceType(), clang::Sema::Context, clang::Stmt::getLocStart(), clang::Stmt::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::Expr::getType().
|
static |
Check that this is a context in which a coroutine suspension can appear.
Definition at line 473 of file SemaCoroutine.cpp.
References clang::Sema::buildCoroutinePromise(), clang::Sema::CurContext, clang::Sema::getCurFunction(), and isValidCoroutineContext().
Referenced by clang::Sema::ActOnCoroutineBodyStart(), clang::Sema::BuildCoreturnStmt(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildResolvedCoawaitExpr(), and clang::Sema::BuildUnresolvedCoawaitExpr().
|
static |
Definition at line 884 of file SemaCoroutine.cpp.
References clang::Sema::Diag(), clang::sema::FunctionScopeInfo::FirstCoroutineStmtLoc, clang::Expr::getExprLoc(), clang::sema::FunctionScopeInfo::getFirstCoroutineStmtKeyword(), and clang::Decl::getLocation().
|
static |
Definition at line 765 of file SemaCoroutine.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, clang::Sema::FindDeallocationFunction(), clang::Sema::FindUsualDeallocationFunction(), clang::Type::getAsCXXRecordDecl(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Sema::isCompleteType(), and clang::Sema::MarkFunctionReferenced().
|
static |
Definition at line 195 of file SemaCoroutine.cpp.
References clang::Sema::CurContext, clang::Sema::Diag(), ID, and clang::Sema::isUnevaluatedContext().
Referenced by checkCoroutineContext().
|
static |
Look up the std::experimental::coroutine_handle<PromiseType>.
Definition at line 152 of file SemaCoroutine.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::Sema::CheckTemplateIdType(), clang::Sema::Context, clang::Sema::Diag(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::Decl::getLocation(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::QualType::isNull(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::Sema::lookupStdExperimentalNamespace(), clang::Sema::PP, clang::Sema::RequireCompleteType(), and Result.
Referenced by buildCoroutineHandle().
|
static |
Definition at line 26 of file SemaCoroutine.cpp.
References clang::Preprocessor::getIdentifierInfo(), clang::Sema::LookupMemberName, clang::Sema::LookupQualifiedName(), clang::Sema::PP, and clang::LookupResult::suppressDiagnostics().
Referenced by clang::Sema::BuildUnresolvedCoawaitExpr(), and lookupMember().
|
static |
Definition at line 37 of file SemaCoroutine.cpp.
References lookupMember().
|
static |
Look up the std::coroutine_traits<...>::promise_type for the given function type.
Definition at line 46 of file SemaCoroutine.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::Type::castAs(), clang::Sema::CheckTemplateIdType(), clang::Sema::Context, clang::NestedNameSpecifier::Create(), clang::Sema::Diag(), clang::ETK_None, clang::IdentifierTable::get(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getElaboratedType(), clang::Preprocessor::getIdentifierTable(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), clang::FunctionProtoType::getParamTypes(), clang::FunctionProtoType::getRefQualifier(), clang::FunctionType::getReturnType(), clang::ASTContext::getRValueReferenceType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::QualType::isNull(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::Sema::lookupStdExperimentalNamespace(), clang::Sema::PP, clang::Sema::RequireCompleteType(), Result, and clang::RQ_RValue.
Referenced by clang::Sema::buildCoroutinePromise().
|
static |
Definition at line 1168 of file SemaCoroutine.cpp.
References clang::Sema::Diag(), clang::sema::FunctionScopeInfo::FirstCoroutineStmtLoc, and clang::sema::FunctionScopeInfo::getFirstCoroutineStmtKeyword().
1.8.6