================
@@ -684,6 +684,19 @@ bool Sema::checkFinalSuspendNoThrow(const Stmt 
*FinalSuspend) {
   return ThrowingDecls.empty();
 }
 
+// [stmt.return.coroutine]p1:
+//   A coroutine shall not enclose a return statement ([stmt.return]).
+static void checkReturnStmtInCoroutine(Sema &S, FunctionScopeInfo *FSI) {
+  assert (!FSI && "FunctionScopeInfo is null");
----------------
ilya-biryukov wrote:

This should be `assert(FSI)`, it should fail with the current version.

BTW, are you building with `LLVM_ENABLE_ASSERTIONS=On`? It's definitely 
recommended for the day-to-day development.

https://github.com/llvm/llvm-project/pull/100985
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to