[PATCH] D99825: [cmake] Enable -Werror=return-type for clang
Aaron Ballman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 14:51:33 PDT 2021
aaron.ballman added a comment.
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.
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