[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)
Katherine Whitlock via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 28 08:36:44 PST 2025
stellar-aria wrote:
> What is the expected behavior of `+128` `-127`?
I feel like they shouldn't be matched, since with opposite signs they're not really within the set of limits? It just feels unintuitive to me for `-127` to be replaced by something like `-std::numeric_limits<int8_t>::max()`. I've added test cases for this, but I'm open to other possibilities as well.
https://github.com/llvm/llvm-project/pull/127430
More information about the cfe-commits
mailing list