[clang-tools-extra] r294913 - [clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members
Mads Ravn via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 12 12:35:42 PST 2017
Author: madsravn
Date: Sun Feb 12 14:35:42 2017
New Revision: 294913
URL: http://llvm.org/viewvc/llvm-project?rev=294913&view=rev
Log:
[clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members
Fix for commit r294912 which had a small error in the AST matcher.
Modified:
clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp?rev=294913&r1=294912&r2=294913&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp Sun Feb 12 14:35:42 2017
@@ -43,7 +43,7 @@ void DeleteNullPointerCheck::registerMat
ifStmt(hasCondition(anyOf(PointerCondition, BinaryPointerCheckCondition)),
hasThen(anyOf(
DeleteExpr, DeleteMemberExpr,
- compoundStmt(has(anyOf(DeleteExpr, DeleteMemberExpr)),
+ compoundStmt(anyOf(has(DeleteExpr), has(DeleteMemberExpr)),
statementCountIs(1))
.bind("compound"))))
.bind("ifWithDelete"),
More information about the cfe-commits
mailing list