================ @@ -848,7 +862,21 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - auto *Transformed = Operand; + bool InplaceCall = + isCoroInplaceCall(Operand) && + isAttributedCoroInplaceTask( + getCurFunctionDecl(/*AllowLambda=*/true)->getReturnType()); + + if (InplaceCall) { + if (auto *Temporary = dyn_cast<CXXBindTemporaryExpr>(Operand)) { ---------------- yuxuanchen1997 wrote:
Correct me if I am wrong: `InplaceCall` already required the expression to be PRValue. Looking at the AST we are dealing with in this pattern, I don't think a MaterializeTemporary would be inserted here? https://github.com/llvm/llvm-project/pull/99282 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits