[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

Congcong Cai via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 18 07:12:51 PST 2025


https://github.com/HerrCai0907 requested changes to this pull request.

The idea of check is good.
But I think the matcher need to refactor a lot.
1. Please place value check in ast matcher part, match all integer will cost lots of cpu and ram to store temporary results.
2. Maybe consider to write 2 different matcher, one for positive (include e.g. +255 and 255), the other for negative (-128) since they have different value scopes.

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


More information about the cfe-commits mailing list