[clang] [Clang] Suppress a ``-Wimplicit-int-conversion``warning introduced in #126846 (PR #139429)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue May 13 03:45:33 PDT 2025


AaronBallman wrote:

> > I think it makes sense to split this off into its own warning group so it can be controlled separately from `-Wimplicit-int-conversion`. It is a common code pattern, but it can still hide bugs that can be hard to spot when the values are on the edge of the range of representable values for the type.
> 
> You mean we should keep my previous changes and separate this pattern
> 
> ```c++
> int8_t x = something; 
> x = -x;
> ```
> 
> to a new warning flag?

Correct. Perhaps something like `-Wimplicit-int-conversion-on-negation` which is grouped under `-Wimplicit-int-conversion`?

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


More information about the cfe-commits mailing list