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)),
|
ifStmt(hasCondition(anyOf(PointerCondition, BinaryPointerCheckCondition)),
|
||||||
hasThen(anyOf(
|
hasThen(anyOf(
|
||||||
DeleteExpr, DeleteMemberExpr,
|
DeleteExpr, DeleteMemberExpr,
|
||||||
compoundStmt(has(anyOf(DeleteExpr, DeleteMemberExpr)),
|
compoundStmt(anyOf(has(DeleteExpr), has(DeleteMemberExpr)),
|
||||||
statementCountIs(1))
|
statementCountIs(1))
|
||||||
.bind("compound"))))
|
.bind("compound"))))
|
||||||
.bind("ifWithDelete"),
|
.bind("ifWithDelete"),
|
||||||
|
|
Loading…
Reference in New Issue