[PATCH] D156787: [analyzer][attr] Add docs to ownership_* attributes

2023-08-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1189 +``onwership_returns``: Functions with this annotation return dynamic memory. +The second annotation parameter is the size of the returned memory in bytes. + donat.nagy wr

[PATCH] D156787: [analyzer][attr] Add docs to ownership_* attributes

2023-08-08 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1189 +``onwership_returns``: Functions with this annotation return dynamic memory. +The second annotation parameter is the size of the returned memory in bytes. + Szelethus wrote:

[PATCH] D156787: [analyzer][attr] Add docs to ownership_* attributes

2023-08-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1189 +``onwership_returns``: Functions with this annotation return dynamic memory. +The second annotation parameter is the size of the returned memory in bytes. + aaron.ballman wro

[PATCH] D156787: [analyzer][attr] Add docs to ownership_* attributes

2023-08-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 548116. Szelethus marked 4 inline comments as done. Szelethus added a comment. Fixes according to reviewer comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156787/new/ https://reviews.llvm.org/D156787 Files: clang/include/clang/Basic/Att

[PATCH] D156787: [analyzer][attr] Add docs to ownership_* attributes

2023-08-03 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/malloc-annotations.c:151-155 +void af6(void) { + int *p = my_malloc(12); + my_hold(p); + *p = 4; +} Please, consider elaborating on this test with some comments, as it's not clear to me at first

[PATCH] D156787: [analyzer][attr] Add docs to ownership_* attributes

2023-08-01 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I haven't looked at the content but I have the feeling that we should probably backport this to release/17.x Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156787/new/ https://reviews.llvm.org/D156787

[PATCH] D156787: [analyzer][attr] Add docs to ownership_* attributes

2023-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for adding documentation for these attributes, it's greatly appreciated! Comment at: clang/include/clang/Basic/AttrDocs.td:1171-1175 +These attributes help the static analyzer understand custom ownership management +functions. Neither

[PATCH] D156787: [analyzer][attr] Add docs to ownership_* attributes

2023-08-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, steakhal, donat.nagy, balazske, gamesh411. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, yaxunl. Herald added a reviewer: aaron.ballman. Herald add