-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:static analyzerwontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid
Description
| Bugzilla Link | 9075 |
| Resolution | WONTFIX |
| Resolved on | Jun 16, 2011 23:44 |
| Version | unspecified |
| OS | All |
| Attachments | Test case |
| Reporter | LLVM Bugzilla Contributor |
| CC | @tkremenek |
Extended Description
Many C libraries allow clients to store void * pointers with arbitrary data or pass them through to callbacks. It would be helpful if attribute((ns_consumed)) worked in such cases. However, it has no effect on void * pointers in checker-254.
I posted an example of such a case here: http://stackoverflow.com/questions/4822178/telling-clang-static-analyzer-about-third-party-libraries-owning-references/ . Ted Kremeneck assumed that ns_consumed would work in this case, but in fact it does not; however, it works in the analogous case using id pointers.
The attached test case includes a model of the pattern, once with a void * pointer, once with an id pointer. The checker complains about the void * case, but not the id case.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:static analyzerwontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid