[PATCH] D150226: [Clang] Remove ability to downgrade warning on the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 15:10:16 PDT 2023


efriedma added a comment.

The fundamental problem here is the interaction with SFINAE; if we don't diagnose this as an error, we actually miscompile some cases.  Because of that, a flag wouldn't really be "turning off the warning"; it would be enabling a non-compliant language mode that has different rules for whether enum casts are legal.

If it weren't for that, I don't think anyone would be in a hurry to turn the warning into a hard error.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150226/new/

https://reviews.llvm.org/D150226



More information about the cfe-commits mailing list