[PATCH] D71607: [clang-tidy] Add unsigned subtraction warning, with suggestion to convert to unsigned literals.
Amin Yahyaabadi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 18 22:52:20 PDT 2021
aminya added a comment.
I just hit this bug in my code where the subtraction of two size_t values resulted in a very large value. Fortunately, the address sanitizer immediately alerted me about the issue. It would be great to have such a warning in clang-tidy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71607/new/
https://reviews.llvm.org/D71607
More information about the cfe-commits
mailing list