[clang] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)
Pavel Skripkin via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 06:31:16 PDT 2024
pskrgag wrote:
I think, it would be even better to drop second argument for `ownership_returns`, since it mirrors the behavior of `alloc_size`. And also allow any return type.
But I am not sure if it's possible to make such change directly. Maybe we should start with deprecation for couple of releases and eventually come to scheme where `ownership_*` annotates classes of resources, while `alloc_size` annotates only memory allocations. And users will be able to combine them as they like.
If this sounds sane, I will fill up an issue.
https://github.com/llvm/llvm-project/pull/99564
More information about the cfe-commits
mailing list