aaron.ballman added inline comments.
Comment at: clang-tidy/misc/DeleteNullCheck.cpp:23
@@ +22,3 @@
+ const auto HasDeleteExpr =
+ cxxDeleteExpr(hasDescendant(declRefExpr().bind("pointerToDelete")))
+ .bind("deleteExpr");
etienneb wrote:
> The use o
etienneb added a comment.
Some comments after a quick look to the code.
Comment at: clang-tidy/misc/DeleteNullCheck.cpp:22
@@ +21,3 @@
+void DeleteNullCheck::registerMatchers(MatchFinder *Finder) {
+ const auto HasDeleteExpr =
+ cxxDeleteExpr(hasDescendant(declRefExpr().bi
Eugene.Zelenko added a comment.
Will be good idea to change some if statements in regression test to (p !=
nullptr) (for C++11) and (p != NULL) (pre-C+11). See
http://clang.llvm.org/extra/clang-tidy/checks/readability-implicit-bool-cast.html.
Repository:
rL LLVM
http://reviews.llvm.org/D212
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.
Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).
I think misc-delete-null-pointer will be better name.
Repository:
rL LLVM
http://reviews.llvm.org/D21298
_