llvm-project
0ada5c7b - [Clang] Separate implicit int conversion on negation sign to new diagnostic group (#139429)

Commit
240 days ago
[Clang] Separate implicit int conversion on negation sign to new diagnostic group (#139429) This PR reverts a change made in #126846. #126846 introduced an ``-Wimplicit-int-conversion`` diagnosis for ```c++ int8_t x = something; x = -x; // warning here ``` This is technically correct since -x could have a width of 9, but this pattern is common in codebases. Reverting this change would also introduce the false positive I fixed in #126846: ```c++ bool b(signed char c) { return -c >= 128; // -c can be 128 } ``` This false positive is uncommon, so I think it makes sense to revert the change.
Author
Parents
Loading