[clang] [sema] Improve -Wsign-compare (PR #65684)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 8 08:41:25 PDT 2023
shafik wrote:
> Yes, there's this way and also when you compare integers smaller than `int`, but those don't trigger -Wsign-compare. -Wsign-compare only triggers if a signed operand is converted to an unsigned operand. This is a PR description bug :)
I did not understand that. I can see why the unsigned case is more problematic but I don't know if I like the asymmetry in the diagnostic. The singed case can still result in really confusing results.
https://github.com/llvm/llvm-project/pull/65684
More information about the cfe-commits
mailing list