Skip to content

Commit ef26db9

Browse files
committed
Move default checks out of options
1 parent 70f1319 commit ef26db9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

clang-tools-extra/docs/clang-tidy/checks/bugprone/raw-memory-call-on-non-trivial-type.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
bugprone-raw-memory-call-on-non-trivial-type
44
============================================
55

6-
Flags use of the C standard library functions ``memset``, ``memcpy`` and
7-
``memcmp`` and similar derivatives on non-trivial types.
6+
Flags use of the C standard library functions ``memset``, ``memcpy`` and
7+
``memcmp`` and similar derivatives on non-trivial types.
8+
9+
The check will detect the following functions: ``memset``, ``std::memset``,
10+
``std::memcpy``, ``memcpy``, ``std::memmove``, ``memmove``, ``std::strcpy``,
11+
``strcpy``, ``memccpy``, ``stpncpy``, ``strncpy``, ``std::memcmp``, ``memcmp``,
12+
``std::strcmp``, ``strcmp``, ``strncmp``.
813

914
Options
1015
-------
@@ -14,25 +19,18 @@ Options
1419
Specify extra functions to flag that act similarly to ``memset``.
1520
Specify names in a semicolon delimited list.
1621
Default is an empty string.
17-
The check will detect the following functions:
18-
``memset``, ``std::memset``.
1922

2023
.. option:: MemCpyNames
2124

2225
Specify extra functions to flag that act similarly to ``memcpy``.
2326
Specify names in a semicolon delimited list.
2427
Default is an empty string.
25-
The check will detect the following functions:
26-
`std::memcpy`, ``memcpy`, `std::memmove`, ``memmove``, ``std::strcpy``,
27-
``strcpy``, ``memccpy``, ``stpncpy``, ``strncpy``.
2828

2929
.. option:: MemCmpNames
3030

3131
Specify extra functions to flag that act similarly to ``memcmp``.
3232
Specify names in a semicolon delimited list.
3333
Default is an empty string.
34-
The check will detect the following functions:
35-
``std::memcmp``, ``memcmp``, ``std::strcmp``, ``strcmp``, ``strncmp``.
3634

3735
This check corresponds to the CERT C++ Coding Standard rule
3836
`OOP57-CPP. Prefer special member functions and overloaded operators to C

0 commit comments

Comments
 (0)