[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

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 23 00:15:39 PDT 2023


carlosgalvezp added a comment.

@shafik @aaron.ballman @dblaikie

Hello! Just wanted to check if there's any blockers for merging this patch? We are now on Clang 18, i.e. 2 releases after the warning was introduced, so IMO I believe it's a good time to turn it into a hard error and test it in the wild.

I read concerns about breaking code. Technically, UB is only invoked in C++17 and onwards (before, it's only unspecified behavior) - could a solution to mitigate risk/break less code be to only enable this hard error in C++17? This way, only people who use a relatively new C++ Standard and compiler would get the error.

I also wonder what is the way forward with respect to code reviews, since Phabricator is deprecated. @shafik do you intend to continue here, or will you duplicate this into a Github PR?

Happy to help if there's anything I can do! Thanks for the great work :)

I'm happy to help


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

https://reviews.llvm.org/D150226



More information about the cfe-commits mailing list