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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 07:14:00 PST 2024


================
@@ -8265,6 +8265,9 @@ def warn_condition_is_assignment : Warning<"using the result of an "
 def warn_free_nonheap_object
   : Warning<"attempt to call %0 on non-heap %select{object %2|object: block expression|object: lambda-to-function-pointer conversion}1">,
     InGroup<FreeNonHeapObject>;
+def warn_called_on_unallocated_object : Warning<
+  "calling function '%0' on an unallocated object '%1'">,
----------------
erichkeane wrote:

This is a little vague and it isn't clear what this means here.  Can we elaborate in a way that isn't super long but is still more informative?  Also, the single ticks here probably shouldn't be, if you use identifiers to print we auto add them.

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


More information about the cfe-commits mailing list