[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.

llvm-svn: 294913
This commit is contained in:
Mads Ravn 2017-02-12 20:35:42 +00:00
parent 6ff978fd54
commit 183e9644b9
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ void DeleteNullPointerCheck::registerMatchers(MatchFinder *Finder) {
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"),