================
@@ -5247,6 +5247,22 @@ 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,
+where the returned memory range does not alias storage from any other object
+accessible to the caller.
+
+In this context, a span-like structure is assumed to have two fields, one of
+which is a pointer to the start of the allocated memory and another one is
+either an integer type containing the size of the actually allocated memory
+or a pointer the end of the allocated region.
----------------
AaronBallman wrote:
```suggestion
or a pointer the end of the allocated region. Note, static data members do not
impact
whether a type is span-like or not.
```
https://github.com/llvm/llvm-project/pull/167010
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits