urnathan added inline comments.

================
Comment at: clang/lib/Sema/SemaCoroutine.cpp:1431-1432
+    //
+    // Then AnalysisBasedWarning would emit a warning about `foo()` lacks a
+    // co_return statements.
+    Fallthrough = S.ActOnNullStmt(PromiseRecordDecl->getLocation());
----------------
Your testcase doesnt show such a warning.  This seems unhelpful.  


================
Comment at: clang/lib/Sema/SemaCoroutine.cpp:1437-1440
     // If the unqualified-id return_void is found, flowing off the end of a
     // coroutine is equivalent to a co_return with no operand. Otherwise,
     // flowing off the end of a coroutine results in undefined behavior.
     Fallthrough = S.BuildCoreturnStmt(FD.getLocation(), nullptr,
----------------
there's some repetition in the comments.  Perhaps a bloc comment before the 
if-else sequence?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116204/new/

https://reviews.llvm.org/D116204

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to