================
@@ -129,7 +130,14 @@ static SmallString<32> buildSuspendPrefixStr(CGCoroData
&Coro, AwaitKind Kind) {
return Prefix;
}
-static bool memberCallExpressionCanThrow(const Expr *E) {
+static bool ResumeExprCanThrow(const CoroutineSuspendExpr &S) {
+ const Expr *E = S.getResumeExpr();
+
+ // If the return type of await_resume is not void, get the CXXMemberCallExpr
+ // from its subexpr.
+ if (const auto *BindTempExpr = dyn_cast<CXXBindTemporaryExpr>(E)) {
+ E = BindTempExpr->getSubExpr();
+ }
----------------
apolloww wrote:
I think we are only targeting the resume part of init_suspend here, so the
cases are limited. Can we change the function name to something more specific,
like `InitResumeExprCanThrow`?
https://github.com/llvm/llvm-project/pull/73160
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits