[PATCH] D55804: [analyzer] C++17: Fix leak false positives when an object with destructor is returned from the top frame.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 18 10:54:46 PST 2018
NoQ added a comment.
In D55804#1334106 <https://reviews.llvm.org/D55804#1334106>, @xazax.hun wrote:
> Is there any downsides for using symbolic region for the construction target? For me that would make perfect sense, since this is often modelled by passing the address of the target into the callee. The programmer could do RVO like thing by hand, so modeling automatic and manual RVO the same way would be the least surprising in my opinion.
Hmm, let me actually see how hard it is. The main reason why i don't like it is that we still need to come up with a symbol to stuff into it, so we're kinda just delaying the inevitable. If we had, for instance, a region for the "implicit variable" that stores the return address, we could announce that this region is live for as long as the stack frame is on the stack, and its `SymbolRegionValue` (together with the `SymbolicRegion` around it) would be automatically kept alive. But if we make an anonymous `SymbolConjured` instead, we would also need to introduce a separate liveness hack to keep it alive, which should ideally be removed later.
CHANGES SINCE LAST ACTION
More information about the cfe-commits