aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

In D69762#1739022 <https://reviews.llvm.org/D69762#1739022>, @xbolva00 wrote:

> We cannot use it for block; it is a hard error. Corountine and function can 
> be merged as suggested.


We can use `.Text` to share diagnostic text between warnings and errors (we do 
this elsewhere), but I don't insist for this patch.

LGTM aside from a commenting request.



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:578
 
 def warn_maybe_falloff_nonvoid_function : Warning<
+  "non-void function does not return a value in all control paths">,
----------------
A FIXME comment that we'd like to combine these diagnostics eventually would be 
appreciated.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6860
     "lambda declared 'noreturn' should not return">;
   def warn_maybe_falloff_nonvoid_lambda : Warning<
+    "non-void lambda does not return a value in all control paths">,
----------------
And maybe move these two up closer to the other duplicate-ish diagnostics.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69762



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

Reply via email to