[clang] [clang][docs] Improve documentation of [[ownership_returns]] attribute (PR #191005)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 11:54:00 PDT 2026
================
@@ -1662,6 +1669,9 @@ Example:
// memory using malloc().
void __attribute((ownership_returns(malloc))) *my_malloc(size_t);
+ // 'sz' (parameter 1) is the allocation size.
+ void __attribute((ownership_returns(malloc, 1))) *my_sized_malloc(size_t sz);
----------------
steakhal wrote:
Should be fixed in b13e25327e143
https://github.com/llvm/llvm-project/pull/191005
More information about the cfe-commits
mailing list