[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 09:59:44 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:
Fixed in https://github.com/llvm/llvm-project/pull/191005/commits/753270be8cf90672af4e9b3256aa16153c66bed5
https://github.com/llvm/llvm-project/pull/191005
More information about the cfe-commits
mailing list