[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 10 12:48:58 PDT 2024
================
@@ -126,6 +126,11 @@ New checks
reference. This may cause use-after-free errors if the caller uses xvalues as
arguments.
+- New :doc:`bugprone-pointer-arithmetic-on-polymorphic-object
+ <clang-tidy/checks/bugprone/pointer-arithmetic-on-polymorphic-object>` check.
+
+ Finds pointer arithmetic performed on classes that declare a virtual function.
----------------
PiotrZSL wrote:
Change this description to point about polymorphic-object. Or instead of that declare (class does not declare anything), just say "that contain".
https://github.com/llvm/llvm-project/pull/91951
More information about the cfe-commits
mailing list