| 1 |
.. title:: clang-tidy - misc-new-delete-overloads |
| 2 |
|
| 3 |
misc-new-delete-overloads |
| 4 |
========================= |
| 5 |
|
| 6 |
`cert-dcl54-cpp` redirects here as an alias for this check. |
| 7 |
|
| 8 |
The check flags overloaded operator ``new()`` and operator ``delete()`` |
| 9 |
functions that do not have a corresponding free store function defined within |
| 10 |
the same scope. |
| 11 |
For instance, the check will flag a class implementation of a non-placement |
| 12 |
operator ``new()`` when the class does not also define a non-placement operator |
| 13 |
``delete()`` function as well. |
| 14 |
|
| 15 |
The check does not flag implicitly-defined operators, deleted or private |
| 16 |
operators, or placement operators. |
| 17 |
|
| 18 |
This check corresponds to CERT C++ Coding Standard rule `DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope |
| 19 |
<https://www.securecoding.cert.org/confluence/display/cplusplus/DCL54-CPP.+Overload+allocation+and+deallocation+functions+as+a+pair+in+the+same+scope>`_. |