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"), _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits