[clang] [sema] Improve -Wsign-compare (PR #65684)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 8 08:16:59 PDT 2023


shafik wrote:

> form when the user doesn't know what happens when integers of different signs are compared (the signed one is cast to an unsigned value).

I just wanted to point out that although this is very much an edge case, but mixed sign comparison can result in conversion to signed type. See the last example in the "The Rules" section. 

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


More information about the cfe-commits mailing list