[PATCH] D91895: [Clang] improve -Wimplicit-fallthrough GCC compat
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 25 14:37:26 PST 2020
Quuxplusone added a comment.
In D91895#2417170 <https://reviews.llvm.org/D91895#2417170>, @kees wrote:
> I think this should warn too. While this won't turn into a "missing break" error, there's no way to know (from looking at code) what the _intent_ is here.
Hear, hear. +1 on everything @kees said but especially this.
(Also: <https://quuxplusone.github.io/blog/2020/09/02/wparentheses/#the-job-of-the-compiler-diagnost> "The job of the compiler-diagnostic-developer is to create some separation between the space of inputs that the compiler considers “clearly X” and the space of inputs that the compiler considers “clearly Y.” Essentially, we create an error-correcting code by deliberately increasing the edit distance between pairs of inequivalent C++ programs — deliberately increasing the number of keystrokes the programmer would have to screw up in order to transform a working (and warning-free) C++ program into an inequivalent broken (yet warning-free) C++ program.")
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91895/new/
https://reviews.llvm.org/D91895
More information about the cfe-commits
mailing list