@@ -267,7 +267,7 @@ static ExprResult buildOperatorCoawaitCall(Sema &SemaRef, Scope *S,
267
267
}
268
268
269
269
static ExprResult buildCoroutineHandle (Sema &S, QualType PromiseType,
270
- Expr *FramePtr, SourceLocation Loc) {
270
+ SourceLocation Loc) {
271
271
QualType CoroHandleType = lookupCoroutineHandleType (S, PromiseType, Loc);
272
272
if (CoroHandleType.isNull ())
273
273
return ExprError ();
@@ -281,6 +281,9 @@ static ExprResult buildCoroutineHandle(Sema &S, QualType PromiseType,
281
281
return ExprError ();
282
282
}
283
283
284
+ Expr *FramePtr =
285
+ S.BuildBuiltinCallExpr (Loc, Builtin::BI__builtin_coro_frame, {});
286
+
284
287
CXXScopeSpec SS;
285
288
ExprResult FromAddr =
286
289
S.BuildDeclarationNameExpr (SS, Found, /* NeedsADL=*/ false );
@@ -294,7 +297,6 @@ struct ReadySuspendResumeResult {
294
297
enum AwaitCallType { ACT_Ready, ACT_Suspend, ACT_Resume };
295
298
Expr *Results[3 ];
296
299
OpaqueValueExpr *OpaqueValue;
297
- bool IsSuspendNoThrow;
298
300
bool IsInvalid;
299
301
};
300
302
@@ -401,10 +403,7 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise,
401
403
402
404
// Assume valid until we see otherwise.
403
405
// Further operations are responsible for setting IsInalid to true.
404
- ReadySuspendResumeResult Calls = {{},
405
- Operand,
406
- /* IsSuspendNoThrow=*/ false ,
407
- /* IsInvalid=*/ false };
406
+ ReadySuspendResumeResult Calls = {{}, Operand, /* IsInvalid=*/ false };
408
407
409
408
using ACT = ReadySuspendResumeResult::AwaitCallType;
410
409
@@ -438,11 +437,8 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise,
438
437
Calls.Results [ACT::ACT_Ready] = S.MaybeCreateExprWithCleanups (Conv.get ());
439
438
}
440
439
441
- Expr *FramePtr =
442
- S.BuildBuiltinCallExpr (Loc, Builtin::BI__builtin_coro_frame, {});
443
-
444
440
ExprResult CoroHandleRes =
445
- buildCoroutineHandle (S, CoroPromise->getType (), FramePtr, Loc);
441
+ buildCoroutineHandle (S, CoroPromise->getType (), Loc);
446
442
if (CoroHandleRes.isInvalid ()) {
447
443
Calls.IsInvalid = true ;
448
444
return Calls;
0 commit comments