zygoloid wrote: > But still I feel generate a warning for this case went too far.
Yeah, that's probably right. Maybe for `-` on a signed operand, we should just return the original range with the `NonNegative` flag cleared out, and shouldn't add the extra bit for the `-128 -> 128` edge case. That's not technically correct, but probably is more useful in practice. https://github.com/llvm/llvm-project/pull/126846 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits