[clang] Diagnose misuse of the cleanup attribute (PR #80040)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 08:50:45 PST 2024


================
@@ -106,6 +106,9 @@ Improvements to Clang's diagnostics
 - Clang now applies syntax highlighting to the code snippets it
   prints.
 
+- Clang now provides improved warnings for the cleanup attribute to detect misuse scenarios,
+  such as attempting to call `free` on unallocated objects.
----------------
AaronBallman wrote:

```suggestion
- Clang now provides improved warnings for the ``cleanup`` attribute to detect misuse scenarios,
  such as attempting to call ``free`` on an unallocated object. Fixes
  `#79443 <https://github.com/llvm/llvm-project/issues/79443>`_.
```

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


More information about the cfe-commits mailing list