================ @@ -684,6 +684,18 @@ 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) { + if (FSI && FSI->FirstReturnLoc.isValid()) { ---------------- ilya-biryukov wrote:
NIT: negate the condition to reduce nesting, see LLVM style guide on [using early exits](https://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code) 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