================
@@ -425,3 +485,32 @@ RValue CIRGenFunction::emitCoawaitExpr(const CoawaitExpr 
&e,
   return emitSuspendExpr(*this, e, curCoro.data->currentAwaitKind, aggSlot,
                          ignoreResult);
 }
+
+mlir::LogicalResult CIRGenFunction::emitCoreturnStmt(CoreturnStmt const &s) {
+  ++curCoro.data->coreturnCount;
+  curLexScope->setCoreturn();
+
+  const Expr *rv = s.getOperand();
+  if (rv && rv->getType()->isVoidType() && !isa<InitListExpr>(rv)) {
+    // Make sure to evaluate the non initlist expression of a co_return
+    // with a void expression for side effects.
+    assert(!cir::MissingFeatures::ehCleanupScope());
----------------
andykaylor wrote:

We have cleanup scopes now. I'm not sure why this MissingFeature is still 
around.
```suggestion
    RunCleanupsScope cleanupScope(*this);
```

https://github.com/llvm/llvm-project/pull/171755
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to