-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[clang-tidy] Rename and move 'cert-oop57-cpp' to 'bugprone-raw-memory-call-on-non-trivial-type' #162039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[clang-tidy] Rename and move 'cert-oop57-cpp' to 'bugprone-raw-memory-call-on-non-trivial-type' #162039
Changes from 14 commits
236cee6
292cafb
a928e61
d0ba4b3
95fd6b5
f590f55
57a3583
1e01e2c
ad1afc4
691131b
bb8c690
8f10a75
59ca5d0
11047c4
e326e07
5e54e7d
70f1319
ef26db9
f82761e
0a1cdaf
13f2caf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. title:: clang-tidy - bugprone-raw-memory-call-on-non-trivial-type | ||
|
||
bugprone-raw-memory-call-on-non-trivial-type | ||
============================================ | ||
|
||
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. | ||
dvbuka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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. | ||
dvbuka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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. | ||
dvbuka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
The check will detect the following functions: | ||
``std::memcmp``, ``memcmp``, ``std::strcmp``, ``strcmp``, ``strncmp``. | ||
|
||
This check corresponds to the CERT C++ Coding Standard rule | ||
`OOP57-CPP. Prefer special member functions and overloaded operators to C | ||
Standard Library functions | ||
<https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP57-CPP.+Prefer+special+member+functions+and+overloaded+operators+to+C+Standard+Library+functions>`_. |
Uh oh!
There was an error while loading. Please reload this page.