[PATCH] D99825: [cmake] Enable -Werror=return-type for clang

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 15:12:03 PDT 2021


xbolva00 added a comment.

In D99825#2672581 <https://reviews.llvm.org/D99825#2672581>, @aaron.ballman wrote:

> In D99825#2671963 <https://reviews.llvm.org/D99825#2671963>, @xbolva00 wrote:
>
>>>> Unlike in C, in C++, flowing off the end of a non-void function other than main results in undefined behavior even when the value of the function is not used.
>
> FWIW, that suggests to me that `-Wreturn-type` should be an error in C++ by default.

+1.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99825



More information about the llvm-commits mailing list