75 if (
auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
76 if (MD->isImplicitObjectMemberFunction()) {
84 QualType T = MD->getFunctionObjectParameterType();
101 diag::err_coroutine_type_missing_specialization))
105 assert(RD &&
"specialization of class template is not a class?");
111 auto *Promise = R.getAsSingle<
TypeDecl>();
114 diag::err_implied_std_coroutine_traits_promise_type_not_found)
125 diag::err_implied_std_coroutine_traits_promise_type_not_class)
130 diag::err_coroutine_promise_type_incomplete))
143 assert(CoroNamespace &&
"Should already be diagnosed");
148 S.
Diag(Loc, diag::err_implied_coroutine_type_not_found)
149 <<
"std::coroutine_handle";
155 Result.suppressDiagnostics();
158 S.
Diag(
Found->getLocation(), diag::err_malformed_std_coroutine_handle);
172 if (CoroHandleType.
isNull())
175 diag::err_coroutine_type_missing_specialization))
178 return CoroHandleType;
189 auto *FD = dyn_cast<FunctionDecl>(S.
CurContext);
192 ? diag::err_coroutine_objc_method
193 : diag::err_coroutine_outside_function) <<
Keyword;
199 enum InvalidFuncDiag {
208 bool Diagnosed =
false;
209 auto DiagInvalid = [&](InvalidFuncDiag ID) {
210 S.
Diag(Loc, diag::err_coroutine_invalid_func_context) << ID <<
Keyword;
217 auto *MD = dyn_cast<CXXMethodDecl>(FD);
220 return DiagInvalid(DiagCtor);
223 return DiagInvalid(DiagDtor);
225 else if (FD->isMain())
226 return DiagInvalid(DiagMain);
232 if (FD->isConstexpr())
233 DiagInvalid(FD->isConsteval() ? DiagConsteval : DiagConstexpr);
236 if (FD->getReturnType()->isUndeducedType())
237 DiagInvalid(DiagAutoRet);
241 if (FD->isVariadic())
242 DiagInvalid(DiagVarargs);
268 if (CoroHandleType.
isNull())
275 S.
Diag(Loc, diag::err_coroutine_handle_missing_member)
306 Base,
Base->getType(), Loc,
false, SS,
312 auto EndLoc = Args.empty() ? Loc : Args.back()->getEndLoc();
325 if (!
T->isClassType() && !
T->isStructureType())
336 Expr *JustAddress = AddressExpr.
get();
341 diag::warn_coroutine_handle_address_invalid_return_type)
372 auto BuildSubExpr = [&](ACT CallType, StringRef
Func,
384 cast_or_null<CallExpr>(BuildSubExpr(ACT::ACT_Ready,
"await_ready", {}));
394 diag::note_await_ready_no_bool_conversion);
395 S.
Diag(Loc, diag::note_coroutine_promise_call_implicitly_required)
408 Expr *CoroHandle = CoroHandleRes.
get();
409 CallExpr *AwaitSuspend = cast_or_null<CallExpr>(
410 BuildSubExpr(ACT::ACT_Suspend,
"await_suspend", CoroHandle));
421 if (
Expr *TailCallSuspend =
428 Calls.
Results[ACT::ACT_Suspend] = TailCallSuspend;
434 diag::err_await_suspend_invalid_return_type)
436 S.
Diag(Loc, diag::note_coroutine_promise_call_implicitly_required)
440 Calls.
Results[ACT::ACT_Suspend] =
445 BuildSubExpr(ACT::ACT_Resume,
"await_resume", {});
468 if (!PD->getType()->isDependentType())
475 bool IsThisDependentType = [&] {
476 if (
const auto *MD = dyn_cast_if_present<CXXMethodDecl>(FD))
477 return MD->isImplicitObjectMemberFunction() &&
478 MD->getThisType()->isDependentType();
482 QualType T = FD->getType()->isDependentType() || IsThisDependentType
489 &
PP.getIdentifierTable().get(
"__promise"),
T,
493 if (VD->isInvalidDecl())
503 if (
auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
511 CtorArgExprs.push_back(ThisExpr.
get());
516 auto &Moves = ScopeInfo->CoroutineParameterMoves;
517 for (
auto *PD : FD->parameters()) {
518 if (PD->getType()->isDependentType())
522 auto Move = Moves.find(PD);
523 assert(Move != Moves.end() &&
524 "Coroutine function parameter not inserted into move map");
532 if (RefExpr.isInvalid())
534 CtorArgExprs.push_back(RefExpr.get());
539 if (!CtorArgExprs.empty()) {
543 CtorArgExprs, FD->getLocation());
546 VD->getLocation(),
true, PLE);
560 VD->setInvalidDecl();
561 }
else if (
Result.get()) {
582 bool IsImplicit =
false) {
589 assert(ScopeInfo &&
"missing function scope for function");
591 if (ScopeInfo->FirstCoroutineStmtLoc.isInvalid() && !IsImplicit)
592 ScopeInfo->setFirstCoroutineStmt(Loc,
Keyword);
594 if (ScopeInfo->CoroutinePromise)
601 if (!ScopeInfo->CoroutinePromise)
611 llvm::SmallPtrSetImpl<const Decl *> &ThrowingDecls) {
612 auto checkDeclNoexcept = [&](
const Decl *D,
bool IsDtor =
false) {
616 if (
const auto *FD = dyn_cast<FunctionDecl>(D)) {
624 if (FD->getBuiltinID() == Builtin::BI__builtin_coro_resume)
627 if (ThrowingDecls.empty()) {
634 diag::err_coroutine_promise_final_suspend_requires_nothrow);
636 ThrowingDecls.insert(D);
640 if (
auto *CE = dyn_cast<CXXConstructExpr>(E)) {
642 checkDeclNoexcept(Ctor);
645 }
else if (
auto *CE = dyn_cast<CallExpr>(E)) {
646 if (CE->isTypeDependent())
649 checkDeclNoexcept(CE->getCalleeDecl());
661 for (
const auto *Child : E->
children()) {
676 ThrowingDecls.end()};
677 sort(SortedDecls, [](
const Decl *A,
const Decl *B) {
680 for (
const auto *D : SortedDecls) {
681 Diag(D->getEndLoc(), diag::note_coroutine_function_declare_noexcept);
683 return ThrowingDecls.empty();
689 assert(FSI &&
"FunctionScopeInfo is null");
691 "first coroutine location not set");
711 if (
Context.getTargetInfo().getCXXABI().isMicrosoft() &&
712 Context.getTargetInfo().getTriple().isX86_32())
713 Diag(KWLoc, diag::warn_coroutines_x86_windows);
716 assert(ScopeInfo->CoroutinePromise);
719 if (ScopeInfo->FirstCoroutineStmtLoc == KWLoc)
724 if (!ScopeInfo->NeedsCoroutineSuspends)
727 ScopeInfo->setNeedsCoroutineSuspends(
false);
732 auto buildSuspends = [&](StringRef Name)
mutable ->
StmtResult {
735 if (Operand.isInvalid())
745 Diag(Loc, diag::note_coroutine_promise_suspend_implicitly_required)
746 << ((Name ==
"initial_suspend") ? 0 : 1);
747 Diag(KWLoc, diag::note_declared_coroutine_here) <<
Keyword;
753 StmtResult InitSuspend = buildSuspends(
"initial_suspend");
757 StmtResult FinalSuspend = buildSuspends(
"final_suspend");
761 ScopeInfo->setCoroutineSuspends(InitSuspend.
get(), FinalSuspend.
get());
802 const bool BadContext =
807 S.
Diag(Loc, diag::err_coroutine_unevaluated_context) <<
Keyword;
813 S.
Diag(Loc, diag::err_coroutine_within_handler) <<
Keyword;
842 Context.DeclarationNames.getCXXOperatorName(OO_Coawait);
847 assert(!Operators.
isAmbiguous() &&
"Operator lookup cannot be ambiguous");
852 Functions.end(),
false,
860 return Record &&
Record->hasAttr<CoroAwaitElidableAttr>();
875 Call->setCoroElideSafe();
878 auto *Fn = llvm::dyn_cast_if_present<FunctionDecl>(
Call->getCalleeDecl());
884 if (PD->hasAttr<CoroAwaitElidableArgumentAttr>())
899 if (Operand->hasPlaceholderType()) {
906 auto *Promise = FSI->CoroutinePromise;
907 if (Promise->getType()->isDependentType()) {
913 auto *RD = Promise->getType()->getAsCXXRecordDecl();
918 if (CurFnAwaitElidable)
921 Expr *Transformed = Operand;
927 diag::note_coroutine_promise_implicit_await_transform_required_here)
928 << Operand->getSourceRange();
931 Transformed = R.get();
941 Expr *Awaiter,
bool IsImplicit) {
991 *
this,
getCurFunction()->CoroutinePromise, Loc,
"yield_value", E);
1027 *
this, Coroutine->CoroutinePromise, Loc, E);
1071 VarDecl *Promise = FSI->CoroutinePromise;
1092 assert(Std &&
"Should already be diagnosed");
1099 S.
Diag(Loc, diag::err_implicit_coroutine_std_nothrow_type_not_found);
1105 Result.suppressDiagnostics();
1108 S.
Diag(
Found->getLocation(), diag::err_malformed_std_nothrow);
1129 unsigned DiagnosticID,
1136 bool HaveIssuedWarning =
false;
1137 for (
auto Decl : R) {
1138 if (!
Decl->getUnderlyingDecl()
1142 if (!HaveIssuedWarning) {
1143 S.
Diag(Loc, DiagnosticID) << Name;
1144 HaveIssuedWarning =
true;
1149 R.suppressDiagnostics();
1150 return HaveIssuedWarning;
1159 diag::warn_coroutine_type_aware_allocator_ignored,
1160 DeleteName, PromiseType);
1162 assert(PointeeRD &&
"PromiseType must be a CxxRecordDecl type");
1164 const bool Overaligned = S.
getLangOpts().CoroAlignedAllocation;
1182 if (!OperatorDelete) {
1191 if (!OperatorDelete)
1195 assert(!OperatorDelete->isTypeAwareOperatorNewOrDelete());
1203 assert(Fn && Fn->isCoroutine() &&
"not a coroutine");
1206 "a null body is only allowed for invalid declarations");
1211 if (!Fn->CoroutinePromise)
1224 if (FD->
hasAttr<AlwaysInlineAttr>())
1229 if (Fn->FirstVLALoc.isValid())
1230 Diag(Fn->FirstVLALoc, diag::err_vla_in_coroutine_unsupported);
1242 if (Builder.isInvalid() || !Builder.buildStatements())
1250 if (
auto *CS = dyn_cast<CompoundStmt>(Body))
1264 : S(S), FD(FD), Fn(Fn), Loc(FD.getLocation()),
1265 IsPromiseDependentType(
1266 !Fn.CoroutinePromise ||
1267 Fn.CoroutinePromise->
getType()->isDependentType()) {
1270 for (
auto KV : Fn.CoroutineParameterMoves)
1271 this->ParamMovesVector.push_back(KV.second);
1274 if (!IsPromiseDependentType) {
1275 PromiseRecordDecl = Fn.CoroutinePromise->getType()->getAsCXXRecordDecl();
1276 assert(PromiseRecordDecl &&
"Type should have already been checked");
1278 this->IsValid = makePromiseStmt() && makeInitialAndFinalSuspend();
1282 assert(this->IsValid &&
"coroutine already invalid");
1283 this->IsValid = makeReturnObject();
1284 if (this->IsValid && !IsPromiseDependentType)
1286 return this->IsValid;
1290 assert(this->IsValid &&
"coroutine already invalid");
1291 assert(!this->IsPromiseDependentType &&
1292 "coroutine cannot have a dependent promise type");
1293 this->IsValid = makeOnException() && makeOnFallthrough() &&
1294 makeGroDeclAndReturnStmt() && makeReturnOnAllocFailure() &&
1295 makeNewAndDeleteExpr();
1296 return this->IsValid;
1299bool CoroutineStmtBuilder::makePromiseStmt() {
1311bool CoroutineStmtBuilder::makeInitialAndFinalSuspend() {
1323 if (
auto *DeclRef = dyn_cast_or_null<DeclRefExpr>(E)) {
1324 auto *
Decl = DeclRef->getDecl();
1326 if (Method->isStatic())
1335 diag::err_coroutine_promise_get_return_object_on_allocation_failure)
1336 << PromiseRecordDecl;
1337 S.
Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here)
1338 << Fn.getFirstCoroutineStmtKeyword();
1342bool CoroutineStmtBuilder::makeReturnOnAllocFailure() {
1343 assert(!IsPromiseDependentType &&
1344 "cannot make statement while the promise type is dependent");
1355 DeclarationName DN =
1356 S.PP.getIdentifierInfo(
"get_return_object_on_allocation_failure");
1358 if (!S.LookupQualifiedName(
Found, PromiseRecordDecl))
1363 S.BuildDeclarationNameExpr(SS,
Found,
false);
1371 S.BuildCallExpr(
nullptr, DeclNameExpr.
get(), Loc, {}, Loc);
1372 if (ReturnObjectOnAllocationFailure.
isInvalid())
1376 S.BuildReturnStmt(Loc, ReturnObjectOnAllocationFailure.
get());
1378 S.Diag(
Found.getFoundDecl()->getLocation(), diag::note_member_declared_here)
1380 S.Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here)
1381 << Fn.getFirstCoroutineStmtKeyword();
1394 if (
auto *MD = dyn_cast<CXXMethodDecl>(&FD)) {
1402 PlacementArgs.push_back(ThisExpr.
get());
1407 if (PD->getType()->isDependentType())
1411 auto PDLoc = PD->getLocation();
1413 bool DeclReferenced = PD->isReferenced();
1418 PD->setReferenced(DeclReferenced);
1423 PlacementArgs.push_back(PDRefExpr.
get());
1429bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {
1431 assert(!IsPromiseDependentType &&
1432 "cannot make statement while the promise type is dependent");
1433 QualType PromiseType = Fn.CoroutinePromise->getType();
1435 if (S.RequireCompleteType(Loc, PromiseType, diag::err_incomplete_type))
1473 FunctionDecl *OperatorNew =
nullptr;
1474 SmallVector<Expr *, 1> PlacementArgs;
1476 bool PlacementArgsFromCoroutine =
false;
1477 DeclarationName NewName =
1478 S.getASTContext().DeclarationNames.getCXXOperatorName(OO_New);
1480 const bool PromiseContainsNew = [
this, &PromiseType, NewName]() ->
bool {
1486 return !
R.empty() && !
R.isAmbiguous();
1491 ImplicitAllocationParameters IAP(
1495 bool WithoutPlacementArgs =
false,
1496 bool ForceNonAligned =
false) {
1507 bool ShouldUseAlignedAlloc =
1508 !ForceNonAligned && S.getLangOpts().CoroAlignedAllocation;
1509 IAP = ImplicitAllocationParameters(
1512 auto FoundAllocations = S.FindAllocationFunctions(
1513 Loc, SourceRange(), NewScope,
1518 if (FoundAllocations) {
1519 IAP = FoundAllocations->IAP;
1520 OperatorNew = FoundAllocations->OperatorNew;
1522 OperatorNew =
nullptr;
1524 assert(!OperatorNew || !OperatorNew->isTypeAwareOperatorNewOrDelete());
1530 if (PromiseContainsNew) {
1533 PlacementArgsFromCoroutine =
true;
1536 LookupAllocationFunction();
1538 if (PromiseContainsNew && !PlacementArgs.empty()) {
1551 if (!OperatorNew || (S.getLangOpts().CoroAlignedAllocation &&
1575 bool FoundNonAlignedInPromise =
false;
1576 if (PromiseContainsNew && S.getLangOpts().CoroAlignedAllocation)
1578 FoundNonAlignedInPromise = OperatorNew;
1584 if (!OperatorNew && !PlacementArgs.empty())
1590 bool IsGlobalOverload =
1595 if (RequiresNoThrowAlloc && (!OperatorNew || IsGlobalOverload)) {
1599 PlacementArgs = {StdNoThrow};
1600 PlacementArgsFromCoroutine =
false;
1601 OperatorNew =
nullptr;
1608 if (FoundNonAlignedInPromise) {
1609 S.Diag(OperatorNew->getLocation(),
1610 diag::warn_non_aligned_allocation_function)
1615 if (PromiseContainsNew) {
1616 S.Diag(Loc, diag::err_coroutine_unusable_new) << PromiseType << &FD;
1618 S, Loc, diag::note_coroutine_unusable_type_aware_allocators, NewName,
1620 }
else if (RequiresNoThrowAlloc)
1621 S.Diag(Loc, diag::err_coroutine_unfound_nothrow_new)
1622 << &FD << S.getLangOpts().CoroAlignedAllocation;
1626 assert(!OperatorNew->isTypeAwareOperatorNewOrDelete());
1629 diag::warn_coroutine_type_aware_allocator_ignored,
1630 NewName, PromiseType);
1632 if (RequiresNoThrowAlloc) {
1633 const auto *FT = OperatorNew->getType()->castAs<FunctionProtoType>();
1634 if (!FT->isNothrow(
false)) {
1635 S.Diag(OperatorNew->getLocation(),
1636 diag::err_coroutine_promise_new_requires_nothrow)
1638 S.Diag(Loc, diag::note_coroutine_promise_call_implicitly_required)
1644 FunctionDecl *OperatorDelete =
nullptr;
1652 assert(!OperatorDelete->isTypeAwareOperatorNewOrDelete());
1655 S.BuildBuiltinCallExpr(Loc, Builtin::BI__builtin_coro_frame, {});
1658 S.BuildBuiltinCallExpr(Loc, Builtin::BI__builtin_coro_size, {});
1660 Expr *FrameAlignment =
nullptr;
1662 if (S.getLangOpts().CoroAlignedAllocation) {
1664 S.BuildBuiltinCallExpr(Loc, Builtin::BI__builtin_coro_align, {});
1670 FrameAlignment = S.BuildCXXNamedCast(Loc, tok::kw_static_cast, AlignValTy,
1671 FrameAlignment, SourceRange(Loc, Loc),
1672 SourceRange(Loc, Loc))
1678 S.BuildDeclRefExpr(OperatorNew, OperatorNew->getType(),
VK_LValue, Loc);
1682 SmallVector<Expr *, 2> NewArgs(1, FrameSize);
1683 if (S.getLangOpts().CoroAlignedAllocation &&
1685 NewArgs.push_back(FrameAlignment);
1689 if (OperatorNew->isVariadic() ||
1690 OperatorNew->getNumParams() > NewArgs.size()) {
1691 llvm::append_range(NewArgs, PlacementArgs);
1692 if (PlacementArgsFromCoroutine)
1697 S.BuildCallExpr(S.getCurScope(), NewRef.
get(), Loc, NewArgs, Loc);
1698 NewExpr = S.ActOnFinishFullExpr(NewExpr.
get(),
false);
1704 QualType OpDeleteQualType = OperatorDelete->getType();
1707 S.BuildDeclRefExpr(OperatorDelete, OpDeleteQualType,
VK_LValue, Loc);
1712 S.BuildBuiltinCallExpr(Loc, Builtin::BI__builtin_coro_free, {FramePtr});
1714 SmallVector<Expr *, 2> DeleteArgs{CoroFree};
1721 const auto *OpDeleteType =
1723 if (OpDeleteType->getNumParams() > DeleteArgs.size() &&
1724 S.getASTContext().hasSameUnqualifiedType(
1725 OpDeleteType->getParamType(DeleteArgs.size()), FrameSize->
getType()))
1726 DeleteArgs.push_back(FrameSize);
1739 if (S.getLangOpts().CoroAlignedAllocation &&
1740 OpDeleteType->getNumParams() > DeleteArgs.size() &&
1741 S.getASTContext().hasSameUnqualifiedType(
1742 OpDeleteType->getParamType(DeleteArgs.size()),
1744 DeleteArgs.push_back(FrameAlignment);
1747 S.BuildCallExpr(S.getCurScope(), DeleteRef.
get(), Loc, DeleteArgs, Loc);
1749 S.ActOnFinishFullExpr(DeleteExpr.
get(),
false);
1759bool CoroutineStmtBuilder::makeOnFallthrough() {
1760 assert(!IsPromiseDependentType &&
1761 "cannot make statement while the promise type is dependent");
1770 bool HasRVoid, HasRValue;
1771 LookupResult LRVoid =
1772 lookupMember(S,
"return_void", PromiseRecordDecl, Loc, HasRVoid);
1773 LookupResult LRValue =
1774 lookupMember(S,
"return_value", PromiseRecordDecl, Loc, HasRValue);
1777 if (HasRVoid && HasRValue) {
1779 S.Diag(FD.getLocation(),
1780 diag::err_coroutine_promise_incompatible_return_functions)
1781 << PromiseRecordDecl;
1783 diag::note_member_first_declared_here)
1786 diag::note_member_first_declared_here)
1789 }
else if (!HasRVoid && !HasRValue) {
1800 Fallthrough = S.ActOnNullStmt(PromiseRecordDecl->getLocation());
1801 if (Fallthrough.isInvalid())
1803 }
else if (HasRVoid) {
1804 Fallthrough = S.BuildCoreturnStmt(FD.getLocation(),
nullptr,
1806 Fallthrough = S.ActOnFinishFullStmt(Fallthrough.get());
1807 if (Fallthrough.isInvalid())
1815bool CoroutineStmtBuilder::makeOnException() {
1817 assert(!IsPromiseDependentType &&
1818 "cannot make statement while the promise type is dependent");
1820 const bool RequireUnhandledException = S.getLangOpts().CXXExceptions;
1822 if (!
lookupMember(S,
"unhandled_exception", PromiseRecordDecl, Loc)) {
1824 RequireUnhandledException
1825 ? diag::err_coroutine_promise_unhandled_exception_required
1827 warn_coroutine_promise_unhandled_exception_required_with_exceptions;
1828 S.Diag(Loc, DiagID) << PromiseRecordDecl;
1829 S.Diag(PromiseRecordDecl->getLocation(), diag::note_defined_here)
1830 << PromiseRecordDecl;
1831 return !RequireUnhandledException;
1835 if (!S.getLangOpts().CXXExceptions)
1840 UnhandledException = S.ActOnFinishFullExpr(UnhandledException.
get(), Loc,
1847 if (!S.getLangOpts().Borland && Fn.FirstSEHTryLoc.isValid()) {
1848 S.Diag(Fn.FirstSEHTryLoc, diag::err_seh_in_a_coroutine_with_cxx_exceptions);
1849 S.Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here)
1850 << Fn.getFirstCoroutineStmtKeyword();
1858bool CoroutineStmtBuilder::makeReturnObject() {
1872 if (
auto *MbrRef = dyn_cast<CXXMemberCallExpr>(E)) {
1873 auto *MethodDecl = MbrRef->getMethodDecl();
1874 S.
Diag(MethodDecl->getLocation(), diag::note_member_declared_here)
1877 S.
Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here)
1878 << Fn.getFirstCoroutineStmtKeyword();
1881bool CoroutineStmtBuilder::makeGroDeclAndReturnStmt() {
1882 assert(!IsPromiseDependentType &&
1883 "cannot make statement while the promise type is dependent");
1884 assert(this->
ReturnValue &&
"ReturnValue must be already formed");
1886 QualType
const GroType = this->
ReturnValue->getType();
1888 "get_return_object type must no longer be dependent");
1890 QualType
const FnRetType = FD.getReturnType();
1892 "get_return_object type must no longer be dependent");
1900 bool GroMatchesRetType = S.getASTContext().hasSameType(GroType, FnRetType);
1904 S.ActOnFinishFullExpr(this->
ReturnValue, Loc,
false);
1908 if (!GroMatchesRetType)
1915 InitializedEntity Entity =
1917 S.PerformCopyInitialization(Entity, SourceLocation(),
ReturnValue);
1923 clang::VarDecl *GroDecl =
nullptr;
1924 if (GroMatchesRetType) {
1928 S.Context, &FD, FD.getLocation(), FD.getLocation(),
1929 &S.PP.getIdentifierTable().get(
"__coro_gro"),
1930 S.BuildDecltypeType(
ReturnValue).getCanonicalType(),
1931 S.Context.getTrivialTypeSourceInfo(GroType, Loc),
SC_None);
1934 S.CheckVariableDeclarationType(GroDecl);
1940 S.PerformCopyInitialization(Entity, SourceLocation(),
ReturnValue);
1944 Res = S.ActOnFinishFullExpr(Res.
get(),
false);
1948 S.AddInitializerToDecl(GroDecl, Res.
get(),
1951 S.FinalizeDeclaration(GroDecl);
1956 S.ActOnDeclStmt(S.ConvertDeclToDeclGroup(GroDecl), Loc, Loc);
1957 if (GroDeclStmt.isInvalid())
1974 if (!GroMatchesRetType &&
2015 if (!ScopeInfo->CoroutineParameterMoves.empty())
2024 for (
auto *PD : FD->parameters()) {
2025 if (PD->getType()->isDependentType())
2029 bool DeclReferenced = PD->isReferenced();
2035 PD->setReferenced(DeclReferenced);
2040 Expr *CExpr =
nullptr;
2041 if (PD->getType()->getAsCXXRecordDecl() ||
2042 PD->getType()->isRValueReferenceType())
2045 CExpr = PDRefExpr.
get();
2049 auto *D =
buildVarDecl(*
this, Loc, PD->getType(), PD->getIdentifier());
2054 if (
Stmt.isInvalid())
2057 ScopeInfo->CoroutineParameterMoves.insert(std::make_pair(PD,
Stmt.get()));
2075 PP.getIdentifierTable().get(
"coroutine_traits");
2083 Diag(KwLoc, diag::err_implied_coroutine_type_not_found)
2084 <<
"std::coroutine_traits";
2091 Result.suppressDiagnostics();
2093 Diag(
Found->getLocation(), diag::err_malformed_std_coroutine_traits);
This file provides some common utility functions for processing Lambda related AST Constructs.
Defines enum values for all the target-independent builtin functions.
Defines the clang::Expr interface and subclasses for C++ expressions.
Result
Implement __builtin_bit_cast and related operations.
llvm::MachO::Record Record
Defines the clang::Preprocessor interface.
static ExprResult buildCoroutineHandle(Sema &S, QualType PromiseType, SourceLocation Loc)
static bool DiagnoseTypeAwareAllocators(Sema &S, SourceLocation Loc, unsigned DiagnosticID, DeclarationName Name, QualType PromiseType)
static void noteMemberDeclaredHere(Sema &S, Expr *E, FunctionScopeInfo &Fn)
static void checkReturnStmtInCoroutine(Sema &S, FunctionScopeInfo *FSI)
static bool isValidCoroutineContext(Sema &S, SourceLocation Loc, StringRef Keyword)
static void applySafeElideContext(Expr *Operand)
static Expr * buildStdNoThrowDeclRef(Sema &S, SourceLocation Loc)
Look up the std::nothrow object.
static ExprResult buildOperatorCoawaitCall(Sema &SemaRef, Scope *S, SourceLocation Loc, Expr *E)
static bool diagReturnOnAllocFailure(Sema &S, Expr *E, CXXRecordDecl *PromiseRecordDecl, FunctionScopeInfo &Fn)
static ExprResult buildPromiseCall(Sema &S, VarDecl *Promise, SourceLocation Loc, StringRef Name, MultiExprArg Args)
static Expr * castForMoving(Sema &S, Expr *E, QualType T=QualType())
static Expr * maybeTailCall(Sema &S, QualType RetType, Expr *E, SourceLocation Loc)
static ExprResult buildMemberCall(Sema &S, Expr *Base, SourceLocation Loc, StringRef Name, MultiExprArg Args)
static LookupResult lookupMember(Sema &S, const char *Name, CXXRecordDecl *RD, SourceLocation Loc, bool &Res)
static void markCoroutineParametersReferenced(FunctionDecl &FD)
static TypeSourceInfo * getTypeSourceInfoForStdAlignValT(Sema &S, SourceLocation Loc)
static bool isWithinCatchScope(Scope *S)
static bool findDeleteForPromise(Sema &S, SourceLocation Loc, QualType PromiseType, FunctionDecl *&OperatorDelete)
static VarDecl * buildVarDecl(Sema &S, SourceLocation Loc, QualType Type, IdentifierInfo *II)
Build a variable declaration for move parameter.
static void checkNoThrow(Sema &S, const Stmt *E, llvm::SmallPtrSetImpl< const Decl * > &ThrowingDecls)
Recursively check E and all its children to see if any call target (including constructor call) is de...
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.
static bool checkSuspensionContext(Sema &S, SourceLocation Loc, StringRef Keyword)
static QualType lookupCoroutineHandleType(Sema &S, QualType PromiseType, SourceLocation Loc)
Look up the std::coroutine_handle<PromiseType>.
static bool collectPlacementArgs(Sema &S, FunctionDecl &FD, SourceLocation Loc, SmallVectorImpl< Expr * > &PlacementArgs)
static CompoundStmt * buildCoroutineBody(Stmt *Body, ASTContext &Context)
static QualType lookupPromiseType(Sema &S, const FunctionDecl *FD, SourceLocation KwLoc)
Look up the std::coroutine_traits<...>::promise_type for the given function type.
static bool isAttributedCoroAwaitElidable(const QualType &QT)
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.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
QualType getRValueReferenceType(QualType T) const
Return the uniqued reference to the type for an rvalue reference to the specified type.
DeclarationNameTable DeclarationNames
QualType getLValueReferenceType(QualType T, bool SpelledAsLValue=true) const
Return the uniqued reference to the type for an lvalue reference to the specified type.
TypeSourceInfo * getTrivialTypeSourceInfo(QualType T, SourceLocation Loc=SourceLocation()) const
Allocate a TypeSourceInfo where all locations have been initialized to a given location,...
QualType getTypeDeclType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier Qualifier, const TypeDecl *Decl) const
CanQualType getCanonicalTagType(const TagDecl *TD) const
AddrLabelExpr - The GNU address of label extension, representing &&label.
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a C++ constructor within a class.
Represents a static or instance method of a struct/union/class.
const CXXRecordDecl * getParent() const
Return the parent of this method declaration, which is the class in which this method is defined.
Represents a C++ struct/union/class.
CXXDestructorDecl * getDestructor() const
Returns the destructor decl for this class.
Represents a C++ nested-name-specifier or a global scope specifier.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
FunctionDecl * getDirectCallee()
If the callee is a FunctionDecl, return it. Otherwise return null.
QualType getCallReturnType(const ASTContext &Ctx) const
getCallReturnType - Get the return type of the call expr.
Declaration of a class template.
void setExprNeedsCleanups(bool SideEffects)
Represents a 'co_await' expression.
CompoundStmt - This represents a group of statements like { stmt stmt }.
static CompoundStmt * Create(const ASTContext &C, ArrayRef< Stmt * > Stmts, FPOptionsOverride FPFeatures, SourceLocation LB, SourceLocation RB)
Represents a 'co_return' statement in the C++ Coroutines TS.
Represents the body of a coroutine.
static CoroutineBodyStmt * Create(const ASTContext &C, CtorArgs const &Args)
CoroutineStmtBuilder(Sema &S, FunctionDecl &FD, sema::FunctionScopeInfo &Fn, Stmt *Body)
Construct a CoroutineStmtBuilder and initialize the promise statement and initial/final suspends from...
bool buildDependentStatements()
Build the coroutine body statements that require a non-dependent promise type in order to construct.
bool buildStatements()
Build the coroutine body statements, including the "promise dependent" statements when the promise ty...
Represents a 'co_yield' expression.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Decl - This represents one declaration (or definition), e.g.
SourceLocation getEndLoc() const LLVM_READONLY
void setInvalidDecl(bool Invalid=true)
setInvalidDecl - Indicates the Decl had a semantic error.
FunctionDecl * getAsFunction() LLVM_READONLY
Returns the function itself, or the templated function if this is a function template.
bool isInvalidDecl() const
SourceLocation getLocation() const
void setImplicit(bool I=true)
DeclContext * getDeclContext()
The name of a declaration.
SourceLocation getBeginLoc() const LLVM_READONLY
Represents a 'co_await' expression while the type of the promise is dependent.
RAII object that enters a new function expression evaluation context.
This represents one expression.
bool isTypeDependent() const
Determines whether the type of this expression depends on.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
bool hasPlaceholderType() const
Returns whether this expression has a placeholder type.
Represents difference between two FPOptions values.
Represents a function declaration or definition.
bool isNoReturn() const
Determines whether this function is known to be 'noreturn', through an attribute on its declaration o...
ArrayRef< ParmVarDecl * > parameters() const
bool isTypeAwareOperatorNewOrDelete() const
Determine whether this is a type aware operator new or delete.
Represents a prototype with parameter type info, e.g.
ArrayRef< QualType > getParamTypes() const
RefQualifierKind getRefQualifier() const
Retrieve the ref-qualifier associated with this function type.
QualType getReturnType() const
One of these records is kept for each identifier that is lexed.
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
Describes the kind of initialization being performed, along with location information for tokens rela...
static InitializationKind CreateForInit(SourceLocation Loc, bool DirectInit, Expr *Init)
Create an initialization from an initializer (which, for direct initialization from a parenthesized l...
ExprResult Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType=nullptr)
Perform the actual initialization of the given entity based on the computed initialization sequence.
Describes an entity that is being initialized.
static InitializedEntity InitializeResult(SourceLocation ReturnLoc, QualType Type)
Create the initialization entity for the result of a function.
static InitializedEntity InitializeVariable(VarDecl *Var)
Create the initialization entity for a variable.
Represents the results of name lookup.
const UnresolvedSetImpl & asUnresolvedSet() const
NamedDecl * getRepresentativeDecl() const
Fetches a representative decl. Useful for lazy diagnostics.
void suppressDiagnostics()
Suppress the diagnostics that would normally fire because of this lookup.
DeclarationName getLookupName() const
Gets the name to look up.
This represents a decl that may have a name.
Represent a C++ namespace.
A C++ nested-name-specifier augmented with source location information.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
decls_iterator decls_begin() const
decls_iterator decls_end() const
static ParenListExpr * Create(const ASTContext &Ctx, SourceLocation LParenLoc, ArrayRef< Expr * > Exprs, SourceLocation RParenLoc)
Create a paren list.
Represents a parameter to a function.
IdentifierInfo * getIdentifierInfo(StringRef Name) const
Return information about the specified preprocessor identifier token.
IdentifierTable & getIdentifierTable()
A (possibly-)qualified type.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
QualType getCanonicalType() const
DestructionKind isDestructedType() const
Returns a nonzero value if objects of this type require non-trivial work to clean up after.
Scope - A scope is a transient data structure that is used while parsing the program.
bool isCatchScope() const
isCatchScope - Return true if this scope is a C++ catch statement.
const Scope * getParent() const
getParent - Return the scope that this is nested in.
bool isFunctionScope() const
isFunctionScope() - Return true if this scope is a function scope.
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID)
Emit a diagnostic.
Sema - This implements semantic analysis and AST building for C.
FunctionDecl * FindUsualDeallocationFunction(SourceLocation StartLoc, ImplicitDeallocationParameters, DeclarationName Name, bool Diagnose=true)
ExprResult BuildOperatorCoawaitCall(SourceLocation Loc, Expr *E, UnresolvedLookupExpr *Lookup)
Build a call to 'operator co_await' if there is a suitable operator for the given expression.
Scope * getCurScope() const
Retrieve the parser's current scope.
ExprResult BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
ExprResult CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp=false)
@ LookupOrdinaryName
Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc....
@ LookupOperatorName
Look up of an operator name (e.g., operator+) for use with operator overloading.
@ LookupMemberName
Member name lookup, which finds the names of class/struct/union members.
bool checkFinalSuspendNoThrow(const Stmt *FinalSuspend)
Check that the expression co_await promise.final_suspend() shall not be potentially-throwing.
StmtResult BuildCoroutineBodyStmt(CoroutineBodyStmt::CtorArgs)
bool FindDeallocationFunction(SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, ImplicitDeallocationParameters, bool Diagnose=true)
ExprResult BuildCoyieldExpr(SourceLocation KwLoc, Expr *E)
void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body)
bool ActOnCoroutineBodyStart(Scope *S, SourceLocation KwLoc, StringRef Keyword)
VarDecl * buildCoroutinePromise(SourceLocation Loc)
const ExpressionEvaluationContextRecord & currentEvaluationContext() const
StmtResult BuildCoreturnStmt(SourceLocation KwLoc, Expr *E, bool IsImplicit=false)
Expr * BuildBuiltinCallExpr(SourceLocation Loc, Builtin::ID Id, MultiExprArg CallArgs)
BuildBuiltinCallExpr - Create a call to a builtin function specified by Id.
ExprResult BuildResolvedCoawaitExpr(SourceLocation KwLoc, Expr *Operand, Expr *Awaiter, bool IsImplicit=false)
FunctionDecl * getCurFunctionDecl(bool AllowLambda=false) const
Returns a pointer to the innermost enclosing function, or nullptr if the current context is not insid...
ExprResult ActOnCoyieldExpr(Scope *S, SourceLocation KwLoc, Expr *E)
DeclGroupPtrTy ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType=nullptr)
ClassTemplateDecl * StdCoroutineTraitsCache
The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>
ASTContext & getASTContext() const
DeclRefExpr * BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
EnumDecl * getStdAlignValT() const
NamedReturnInfo getNamedReturnInfo(Expr *&E, SimplerImplicitMoveMode Mode=SimplerImplicitMoveMode::Normal)
Determine whether the given expression might be move-eligible or copy-elidable in either a (co_)retur...
StmtResult ActOnCoreturnStmt(Scope *S, SourceLocation KwLoc, Expr *E)
const LangOptions & getLangOpts() const
ExprResult BuildCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
BuildCallExpr - Handle a call to Fn with the specified array of arguments.
CleanupInfo Cleanup
Used to control the generation of ExprWithCleanups.
ExprResult BuildUnresolvedCoawaitExpr(SourceLocation KwLoc, Expr *Operand, UnresolvedLookupExpr *Lookup)
bool buildCoroutineParameterMoves(SourceLocation Loc)
sema::FunctionScopeInfo * getCurFunction() const
QualType BuildReferenceType(QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
Build a reference type.
ExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *input, bool RequiresADL=true)
Create a unary operation that may resolve to an overloaded operator.
ExprResult ActOnCoawaitExpr(Scope *S, SourceLocation KwLoc, Expr *E)
ExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL, bool AcceptInvalidDecl=false)
DeclContext * CurContext
CurContext - This is the current declaration context of parsing.
MaterializeTemporaryExpr * CreateMaterializeTemporaryExpr(QualType T, Expr *Temporary, bool BoundToLvalueReference)
ExprResult PerformContextuallyConvertToBool(Expr *From)
PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C+...
bool isUnevaluatedContext() const
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
ExprResult CheckPlaceholderExpr(Expr *E)
Check for operands with placeholder types and complain if found.
ClassTemplateDecl * lookupCoroutineTraits(SourceLocation KwLoc, SourceLocation FuncLoc)
Lookup 'coroutine_traits' in std namespace and std::experimental namespace.
DeclContext * computeDeclContext(QualType T)
Compute the DeclContext that is associated with the given type.
void CheckCompleteVariableDeclaration(VarDecl *VD)
QualType CheckTemplateIdType(ElaboratedTypeKeyword Keyword, TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, Scope *Scope, bool ForNestedNameSpecifier)
@ PotentiallyEvaluated
The current expression is potentially evaluated at run time, which means that code may be generated t...
ExprResult BuildOperatorCoawaitLookupExpr(Scope *S, SourceLocation Loc)
StmtResult ActOnDeclStmt(DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
bool RequireCompleteType(SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
Ensure that the type T is a complete type.
bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
Perform qualified name lookup into a given context.
Expr * MaybeCreateExprWithCleanups(Expr *SubExpr)
MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups,...
FullExprArg MakeFullDiscardedValueExpr(Expr *Arg)
NamespaceDecl * getStdNamespace() const
friend class InitializationSequence
void ActOnUninitializedDecl(Decl *dcl)
void AddInitializerToDecl(Decl *dcl, Expr *init, bool DirectInit)
AddInitializerToDecl - Adds the initializer Init to the declaration dcl.
ExprResult BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *Ty, Expr *E, SourceRange AngleBrackets, SourceRange Parens)
void MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, bool MightBeOdrUse=true)
Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2,...
void CheckVariableDeclarationType(VarDecl *NewVD)
bool LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation=false, bool ForceNoCPlusPlus=false)
Perform unqualified name lookup starting from a given scope.
ExprResult ActOnCXXThis(SourceLocation Loc)
static CanThrowResult canCalleeThrow(Sema &S, const Expr *E, const Decl *D, SourceLocation Loc=SourceLocation())
Determine whether the callee of a particular function call can throw.
ExprResult ActOnFinishFullExpr(Expr *Expr, bool DiscardedValue)
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
SourceLocation getBeginLoc() const LLVM_READONLY
A convenient class for passing around template argument information.
void addArgument(const TemplateArgumentLoc &Loc)
Location wrapper for a TemplateArgument.
Represents a template argument.
Represents a declaration of a type.
A container of type source information.
The base class of the type hierarchy.
bool isBooleanType() const
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
bool isVoidPointerType() const
const T * castAs() const
Member-template castAs<specific type>.
bool isReferenceType() const
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
bool isRecordType() const
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
static UnresolvedLookupExpr * Create(const ASTContext &Context, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool RequiresADL, UnresolvedSetIterator Begin, UnresolvedSetIterator End, bool KnownDependent, bool KnownInstantiationDependent)
void append(iterator I, iterator E)
A set of unresolved declarations.
Represents a variable declaration or definition.
static VarDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S)
@ CallInit
Call-style initialization (C++98)
void setNRVOVariable(bool NRVO)
Retains information about a function, method, or block that is currently being parsed.
SourceLocation FirstCoroutineStmtLoc
First coroutine statement in the current function.
std::pair< Stmt *, Stmt * > CoroutineSuspends
The initial and final coroutine suspend points.
VarDecl * CoroutinePromise
The promise object for this coroutine, if any.
bool hasInvalidCoroutineSuspends() const
StringRef getFirstCoroutineStmtKeyword() const
SourceLocation FirstReturnLoc
First 'return' statement in the current function.
Defines the clang::TargetInfo interface.
Top level wrappers for InstallAPI frontend operations.
CanQual< Type > CanQualType
Represents a canonical, potentially-qualified type.
bool isa(CodeGen::Address addr)
AllocationFunctionScope
The scope in which to find allocation functions.
@ Both
Look for allocation functions in both the global scope and in the scope of the allocated class.
@ Global
Only look for allocation functions in the global scope.
@ Class
Only look for allocation functions in the scope of the allocated class.
AlignedAllocationMode alignedAllocationModeFromBool(bool IsAligned)
Expr * IgnoreExprNodes(Expr *E, FnTys &&... Fns)
Given an expression E and functions Fn_1,...,Fn_n : Expr * -> Expr *, Recursively apply each of the f...
@ RQ_RValue
An rvalue ref-qualifier was provided (&&).
@ TemplateName
The identifier is a template name. FIXME: Add an annotation for that.
bool isAlignedAllocation(AlignedAllocationMode Mode)
MutableArrayRef< Expr * > MultiExprArg
bool isLambdaCallOperator(const CXXMethodDecl *MD)
@ Result
The result type of a method or function.
const FunctionProtoType * T
@ Keyword
The name has been typo-corrected to a keyword.
Expr * IgnoreImplicitSingleStep(Expr *E)
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
Expr * IgnoreParensSingleStep(Expr *E)
U cast(CodeGen::Address addr)
@ None
No keyword precedes the qualified type name.
ActionResult< Expr * > ExprResult
ActionResult< Stmt * > StmtResult
OpaqueValueExpr * OpaqueValue
Stmt * ReturnStmtOnAllocFailure
ArrayRef< Stmt * > ParamMoves
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
SizedDeallocationMode PassSize
enum clang::Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext