[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 4 07:26:46 PST 2023
erichkeane wrote:
I think there is value to adding this if only for the GCC compat story here. I realize we don't like non-on-by-default warnings, but it IS something that folks use reasonably often, and we've even acquiesced to making it an ignored flag IIRC. Aaron is the real decision maker here, but I think I'd have no problem holding my nose and allowing the non-on-by-default here, if only to match GCC.
BUT, this should make sure to match behavior of GCC WRT enums/etc. But if folks want a warning for a fully-covered enum, I think there is value in giving it to them.
Patch itself need some additional testing (particularly around templates/dependence/etc), a release note, additional documentation in our commandline reference/etc.
https://github.com/llvm/llvm-project/pull/73077
More information about the cfe-commits
mailing list