hokein added inline comments.

================
Comment at: test/clang-tidy/readability-delete-null-pointer.cpp:3
+
+#include <cstdlib>
+
----------------
We don't rely on implementations of standard headers in lit test. You should 
fake the function/class that you need in this test. 


================
Comment at: test/clang-tidy/readability-delete-null-pointer.cpp:7
+  int *p = 0;
+  if (p) {
+    // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'if' statement is unnecessary; 
deleting null pointer has no effect [readability-delete-null-pointer]
----------------
Does it work the case like:

```
int *p = nullptr;
if (p == nullptr) {
   p = new int[3];
   delete[] p;
}
```

?


https://reviews.llvm.org/D21298



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to