lebedev.ri added a comment. In D61288#1486008 <https://reviews.llvm.org/D61288#1486008>, @aaron.ballman wrote:
> In D61288#1486006 <https://reviews.llvm.org/D61288#1486006>, @xbolva00 wrote: > > > Some coding guidelines may require switch to have always default label. > > Even if devs know that default is not reachable, they can add default: > > abort(); or assert to increase safety (and warning will be silenced). > > > > Yes, it not suitable to be enabled by default, but I still think it is good > > to have it. > > > We typically don't add new, default-off warnings because experience has shown > that users don't enable them. The coding guidelines argument is somewhat > persuasive, but I wonder whether this is better handled through clang-tidy > checks rather than the compiler itself -- that's where we put other > diagnostics that may not be suitable for the compiler. Have you thought about > surfacing this functionality that way? I honestly have to agree. I think it would be best as a clang-tidy check, because i can fully envision the exact opposite guideline, "avoid `default` so you get notified about every switch that needs to be updated". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61288/new/ https://reviews.llvm.org/D61288 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits