[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
Tue Jun 30 12:04:03 PDT 2026
vbvictor wrote:
Thank you for description and improving the check.
While I still won't be making a proper review, one key improvement could be custom list of "size-functions". By default it could be `size;length` (since std::string have `length`) and users may specify other functions that they have as well.
Also, consider extending the check to accept free-standing versions of size methods like std::size.
------------------------------------
One issue I have with this check is that it drastically reduce readability (in my opinion).
Do you know any projects (preferable medium to big in size) in the wild that already follow this style?
https://github.com/llvm/llvm-project/pull/206349
More information about the cfe-commits
mailing list