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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to