This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] [RetainCountChecker] Escape values stored into smart pointers if they have non-stack storage
AbandonedPublic

Authored by george.karpenkov on Jan 24 2019, 5:52 PM.

Details

Reviewers
dcoughlin
NoQ
Summary

The previous exception for smart pointers was too general

Diff Detail

Event Timeline

NoQ added inline comments.Jan 25 2019, 5:52 PM
clang/test/Analysis/osobject-retain-release.cpp
669

I suspect that this object B does not necessarily has local storage here. Due to copy elision it may end up pretty much anywhere. The smart pointer is on the stack though. When exactly is the escape supposed to happen here? Do we have a more simple test? :)

Also does this need to be a method?

NoQ added a comment.Feb 26 2019, 1:05 PM

*adds an internal tracking backreference*

rdar://problem/47323216

george.karpenkov abandoned this revision.Nov 20 2019, 5:55 PM