[clang-tools-extra] [clang-tidy] Add bugprone-container-bounds-check-overflow check (PR #206349)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 28 10:39:15 PDT 2026


vbvictor wrote:

LLVM release will be in 2 weeks so I won't be reviewing any big features in upcoming weeks.
Please see https://clang.llvm.org/extra/clang-tidy/Contributing.html#making-your-check-robust to make you check better.

TBH, I don't think this check will be useful in current state. As I see we try to solve overflow problem so in general we should flag all `a + b < c` patterns which is too much to be useful IMO. E.g. nothing stops someone to write code like this: `auto s = v.size(); a + b < s` and get an overflow that we won't be able to catch


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


More information about the cfe-commits mailing list