[clang] [clang] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 09:18:20 PDT 2024


https://github.com/AaronBallman commented:

I'm pretty sure the C implementation of `constexpr` leans on this code to determine if the value is exactly representable without a change in value. But it looks like Clang currently doesn't get this quite right: https://godbolt.org/z/W3a8cPjnM Can you add some tests for C as well? (We can use the tests to document existing behavior, but there may be bugs here to be addressed. CC @Fznamznon)

https://github.com/llvm/llvm-project/pull/78112


More information about the cfe-commits mailing list