[PATCH] D36750: [analyzer] RetainCount: When diagnosing overrelease, mention if it's coming from a nested block.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 1 06:51:35 PDT 2017

NoQ planned changes to this revision.
NoQ added a comment.

This is all wrong. While `RetainCountChecker` is more function-local than, say, `MallocChecker`, we still can't say for sure that it is the bottom frame's function (or block) that should be owning the object in this case. Ideally it should, but that's not the pattern that the checker is de facto trying to find. The checker is usually fine seeing a pointer allocated in a top function and released in a sub-block. If the bottom frame is over-releasing, we'd warn, but it wouldn't be simply because the bottom frame is over-releasing, so mentioning the particular stack frame may end up being misleading.


More information about the cfe-commits mailing list