[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 04:25:20 PDT 2024


================
@@ -694,6 +707,9 @@ bool Sema::ActOnCoroutineBodyStart(Scope *SC, SourceLocation KWLoc,
   auto *ScopeInfo = getCurFunction();
   assert(ScopeInfo->CoroutinePromise);
 
+  if (ScopeInfo->FirstCoroutineStmtLoc == KWLoc)
----------------
ivanaivanovska wrote:

Done.

https://github.com/llvm/llvm-project/pull/100985


More information about the cfe-commits mailing list