[clang] [analyzer] Remove redundant bug type DoubleDelete (PR #147542)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 9 07:28:11 PDT 2025


================
@@ -412,7 +412,7 @@ class DerefClass{
 void testDoubleDeleteClassInstance() {
   DerefClass *foo = new DerefClass();
   delete foo;
-  delete foo; // newdelete-warning {{Attempt to delete released memory}}
+  delete foo; // newdelete-warning {{Attempt to free released memory}}
----------------
NagyDonat wrote:

In my commit https://github.com/llvm/llvm-project/pull/147542/commits/15b8a18b0d0b706ac7a93c7b0591197cf9d27cff I refactored this area of the code (by inlining `checkDoubleDelete` to remove a superfluous layer of indirection) and added a comment that describes the role of this branch.

https://github.com/llvm/llvm-project/pull/147542


More information about the cfe-commits mailing list