blob: 21c91b460caf93e10923983bdad82b2af1626309 [file] [log] [blame]
.. title:: clang-tidy - readability-delete-null-pointer
readability-delete-null-pointer
===============================
Checks the ``if`` statements where a pointer's existence is checked and then deletes the pointer.
The check is unnecessary as deleting a null pointer has no effect.
.. code:: c++
int *p;
if (p)
delete p;