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