forked from OSchip/llvm-project
[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:
parent
6ff978fd54
commit
183e9644b9
|
@ -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"),
|
||||
|
|
Loading…
Reference in New Issue