[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

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 13:35:47 PDT 2023


dim added a subscriber: bsdjhb.
dim added a comment.

In D150226#4353911 <https://reviews.llvm.org/D150226#4353911>, @aaron.ballman wrote:

> One of the major selling points to `constexpr` functions in C++ is that they cannot contain UB -- if your code compiles, it is correct. This bug that we've fixed was another instance of us accidentally allowing UB in a constant expression context when we shouldn't have. FWIW, I pointed out a reasonable workaround for the freebsd issue: https://reviews.llvm.org/D150226#4342516

I tried making that work for gdb, but I failed; there are some complains about deleted operator~ that I didn't see before, and I'm going to have to let it rest for a bit. I could maybe convince @bsdjhb to submit a solution, since he's contributed to gdb and binutils before.


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

https://reviews.llvm.org/D150226



More information about the cfe-commits mailing list