[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
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 15 08:15:09 PDT 2023
aaron.ballman added a comment.
In D150226#4340166 <https://reviews.llvm.org/D150226#4340166>, @manojgupta wrote:
> https://github.com/bminor/binutils-gdb/blob/master/include/diagnostics.h
>
> gdb only suppresses the warning. So this patch will likely break gdb.
>
> As per commit: https://github.com/bminor/binutils-gdb/commit/ae61525fcf456ab395d55c45492a106d1275873a
>
> Since the current code does what we want, and I don't see any way of doing it
> differently, ignore -Wenum-constexpr-conversion around it.
Hmmm, I'm not certain, but I *think* this does the right thing: `std::is_signed_v<decltype(1 ? std::declval<Ty>() : std::declval<std::underlying_type_t<Ty>>())>;`
https://godbolt.org/z/MWY4e1e9e
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150226/new/
https://reviews.llvm.org/D150226
More information about the cfe-commits
mailing list