[PATCH] D118880: [analyzer] Improve NoOwnershipChangeVisitor's understanding of deallocators
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 9 04:30:34 PST 2022
Szelethus added inline comments.
================
Comment at: clang/test/Analysis/NewDeleteLeaks.cpp:152
+ // like to deallocate anything.
+ bar();
+}
----------------
steakhal wrote:
> I guess we would not have the warning if `bar` would accept the pointer `P`, since that way it would escape.
> Am I correct?
That is correct, but as an earlier todo states, we don't currently employ any heuristics to guess whether `bar` was responsible for storing `P` (as opposed to deallocating it, which is what this patch is about), but failed to.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118880/new/
https://reviews.llvm.org/D118880
More information about the cfe-commits
mailing list