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
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:
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
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
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
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
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
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