[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 May 18 12:37:49 PDT 2023


efriedma added a comment.

In D150226#4354063 <https://reviews.llvm.org/D150226#4354063>, @efriedma wrote:

>> Also note, one of the bugs I reference shows how this breaks SFINAE: https://github.com/llvm/llvm-project/issues/57176 and that is not easily fixable. So this is non-conforming since it breaks valid code.
>
> You can mark a warning diagnostic SFINAEFailure to ensure it's treated as an error in contexts where SFINAE matters.  It might make sense to do that as an intermediate step.

Oh, I guess it's actually a bit trickier because constant evaluation is involved... we don't currently have an equivalent there.  Probably it's doable somehow, but maybe not worth the effort.


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

https://reviews.llvm.org/D150226



More information about the cfe-commits mailing list