This revision was automatically updated to reflect the committed changes.
Closed by commit rL289047: [analyzer] Add dispatch_data_create as a special
case in RetainCountChecker. (authored by dergachev).
Changed prior to commit:
https://reviews.llvm.org/D27409?vs=80606&id=80750#toc
Repository:
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
Ship it! :-)
https://reviews.llvm.org/D27409
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/
NoQ retitled this revision from "[analyzer] RetainCountChecker: Improve support
for libdispatch APIs." to "[analyzer] RetainCountChecker: The callback in
dispatch_data_create() doesn't free the return symbol.".
NoQ updated the summary for this revision.
NoQ updated this revision to Diff 80606.
No
dcoughlin added a comment.
Looks good to me!
To ease the future maintenance burden I would suggest moving the test into
'retain-release-arc.m' unless it really needs to be in its own separate file.
Comment at: test/Analysis/dispatch-data-leak.m:59
+#endif
+}
zaks.anna added inline comments.
Comment at: test/Analysis/dispatch-data-leak.m:50
+
+ malloc_buf = malloc(1024);
+ data = dispatch_data_create(buf, 1024, dispatch_get_main_queue(), ^{}); //
expected-warning{{Potential leak of memory pointed to by 'malloc_buf'}}
--
NoQ updated this revision to Diff 80264.
NoQ added a comment.
Update the comments in the surrounding code accordingly.
https://reviews.llvm.org/D27409
Files:
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
test/Analysis/dispatch-data-leak.m
Index: test/Analysis/dispatch-data-leak.m
===
NoQ created this revision.
NoQ added reviewers: zaks.anna, dcoughlin.
NoQ added a subscriber: cfe-commits.
The hack that was previously applied to `CGBitmapContextCreateWithData()` is
now extended to another function, `dispatch_data_create()`.
This function accepts a callback block, and the anal