[PATCH] D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 6 17:40:04 PDT 2022

thakis added a comment.

It's already an error, but it's a warning default-mapped to an error. You can -Wno-error=name to downgrade it into a warning, but that requires an explicit action. So people are unlikely to miss it.

This is how we usually handle these breaking changes.

Maybe there could be a test for the -Wno-error= case? But this looks roughly right to me overall. I haven't looked in detail.



More information about the cfe-commits mailing list