[clang] [Clang] Introduce malloc_span attribute (PR #167010)

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 10 02:49:42 PST 2025


================
@@ -5247,6 +5247,21 @@ yet implemented in clang.
   }];
 }
 
+def MallocSpanDocs : Documentation {
+  let Category = DocCatFunction;
+  let Heading = "malloc_span";
+  let Content = [{
+The ``malloc_span`` attribute can be used to mark that a function which acts
+like a system memory allocation function and returns a span-like structure
----------------
melver wrote:

```suggestion
like a system memory allocation function and returns a span-like structure,
```

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


More information about the cfe-commits mailing list