================
@@ -8956,6 +8956,15 @@
TreeTransform<Derived>::TransformDependentCoawaitExpr(DependentCoawaitExpr *E) {
template<typename Derived>
ExprResult
TreeTransform<Derived>::TransformCoyieldExpr(CoyieldExpr *E) {
+ // FINAL FIX: Strict check.
+ // 1. If we are in a function scope, but the CoroutinePromise is missing
+ // (null),
+ // it means the coroutine setup failed (e.g. valid promise type not
found).
+ // 2. If the promise exists but is invalid, we also fail.
+ if (clang::sema::FunctionScopeInfo *FSI = getSema().getCurFunction()) {
----------------
zyn0217 wrote:
I think we are not supposed to get here if the surrounding promise is invalid.
Can you explore if we can bail out early before TreeTransform?
https://github.com/llvm/llvm-project/pull/176082
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits