[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 1 01:56:49 PDT 2025
================
@@ -106,6 +106,10 @@ Changes in existing checks
<clang-tidy/checks/bugprone/unsafe-functions>` check to allow specifying
additional C++ member functions to match.
+- Improved :doc:`cppcoreguidelines-pro-bounds-pointer-arithmetic
+ <clang-tidy/checks/cppcoreguidelines/pro-bounds-pointer-arithmetic>` check by
+ fix false positives related to operator overloading and templates.
----------------
flovent wrote:
I think template should be mentioned because it's the necessary condition in this false positive, for `std::map::operator[]` or other indexing operators like `std::vector::operator[]` outside of template, there will be `CallExpr` generated, this checker didn't match `CallExpr` before this PR's change.
https://github.com/llvm/llvm-project/pull/127394
More information about the cfe-commits
mailing list