hstk30-hw wrote:

> For example, Folks at google advise against using `default` when switching 
> over an enum https://abseil.io/tips/147.
> Misra requires a default statement, but makes an exception for enums. (6.4.6 
> in misra 2008)

I see it's easy to implement in LLVM like clang tidy (not warning for enum and 
constant expr).

The clang tidy may seperate the `switch` warning ( I have to use tidy to see 
`switch-default`, but I can see `switch-enum` `switch-bool` in compiler).

IMAO, if we can implement it together in compiler, why not?

https://github.com/llvm/llvm-project/pull/73077
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to