[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang-tools-extra / docs / clang-tidy / checks / readability / delete-null-pointer.rst
blob21c91b460caf93e10923983bdad82b2af1626309
1 .. title:: clang-tidy - readability-delete-null-pointer
3 readability-delete-null-pointer
4 ===============================
6 Checks the ``if`` statements where a pointer's existence is checked and then deletes the pointer.
7 The check is unnecessary as deleting a null pointer has no effect.
9 .. code:: c++
11   int *p;
12   if (p)
13     delete p;