15 lines · plain
1.. title:: clang-tidy - readability-delete-null-pointer2 3readability-delete-null-pointer4===============================5 6Checks the ``if`` statements where a pointer's existence is checked and7then deletes the pointer.8The check is unnecessary as deleting a null pointer has no effect.9 10.. code:: c++11 12 int *p;13 if (p)14 delete p;15