[clang-tools-extra] [clang-tidy] Rename and move 'cert-oop57-cpp' to 'bugprone-libc-memory-calls-on-nontrivial-types' (PR #162039)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 6 08:18:37 PDT 2025


================
@@ -0,0 +1,40 @@
+.. title:: clang-tidy - bugprone-libc-memory-calls-on-nontrivial-types
+
+bugprone-libc-memory-calls-on-nontrivial-types
+==============
+
+  Flags use of the `C` standard library functions ``memset``, ``memcpy`` and
+  ``memcmp`` and similar derivatives on non-trivial types.
+
+Options
+-------
+
+.. option:: MemSetNames
+
+   Specify extra functions to flag that act similarly to ``memset``.
+   Specify names in a semicolon delimited list.
+   Default is an empty string.
+   The check will detect the following functions:
+   `memset`, `std::memset`.
+
+.. option:: MemCpyNames
+
+   Specify extra functions to flag that act similarly to ``memcpy``.
+   Specify names in a semicolon delimited list.
+   Default is an empty string.
+   The check will detect the following functions:
+   `std::memcpy`, `memcpy`, `std::memmove`, `memmove`, `std::strcpy`,
+   `strcpy`, `memccpy`, `stpncpy`, `strncpy`.
+
+.. option:: MemCmpNames
+
+   Specify extra functions to flag that act similarly to ``memcmp``.
+   Specify names in a semicolon delimited list.
+   Default is an empty string.
+   The check will detect the following functions:
+   `std::memcmp`, `memcmp`, `std::strcmp`, `strcmp`, `strncmp`.
----------------
EugeneZelenko wrote:

Ditto.

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


More information about the cfe-commits mailing list