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

Dave Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 11:00:35 PDT 2021


kastiglione added a comment.

1. I've updated the summary to include wording from the original diff D98224 <https://reviews.llvm.org/D98224> which points out that `-Werror=return-type` is used in libcxx, libcxxabi, and libunwind.
2. Warnings have a spectrum of severity, `-Wreturn-type` is one of the most severe, but turning on `-Werror` for more mundane warnings would be a deal breaker for some projects. I think it's more reasonable to turn errors on individually, rather than require a codebase to be all or nothing.
3. There are already other `-Werror=...` in this same file, so there is precedent.

Are there downsides to this? I don't see them, I only seem benefits.


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