[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when 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
Thu Aug 4 11:09:10 PDT 2022


smeenai added a comment.

https://godbolt.org/z/axhbj3MPE is a simpler repro in Godbolt with Boost 1.79 (the latest version).

I agree that it'll be tricky to manage expectations if we downgrade to a warning, but I also suspect that the first time many people will run into this new error is when we start doing the RCs for LLVM 16, and we'll discover lots more breakage then. I'd hope that giving the warning a sufficiently scary name (e.g. suffixing it with `-will-be-removed-in-clang-17`) and having a release notes entry would help us actually be able to convert this into an error in the future though and not just keep kicking the can down the road. It'd also help if we could compile the fixes for issues with this new error in common libraries (e.g. the Boost error here) somewhere, so that people using those common libraries can reference that to fix their own codebases.


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

https://reviews.llvm.org/D130058



More information about the cfe-commits mailing list