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

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

Reply via email to