[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

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 7 17:17:25 PDT 2022

smeenai added a comment.

In D131307#3704709 <https://reviews.llvm.org/D131307#3704709>, @thakis wrote:

> 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.

Right, but we also want people to understand that the downgrade possibility will be going away in the next release (i.e. it'll always be an error and there's nothing you can do about that), so they really do want to deal with this as a priority.



More information about the cfe-commits mailing list