[cfe-dev] Inlining temporary destructors in the analyzer
jordan_rose at apple.com
Fri Aug 8 09:27:27 PDT 2014
> Ok, after trying to craft a lengthy response, I think I finally understand :)
> The problem really is that to correctly model inlining of temp dtors for parameters, we have to correctly mark the regions as "escaping" (thus all it's content is unknown) when either a) we don't inline the function call itself (perhaps because we don't actually see the implementation), or b) the data escapes within the inlined function.
> I updated the patch to not inline temporary destructors that bind to parameters.
> I'm not sure whether inlining the constructors in those cases is benign (it seems like it would be).
It probably is benign as long as the destructor is in the CFG at all. (If it's not, it could result in an unbalanced allocation. Which is true of methods as well, but more likely in a constructor.)
More information about the cfe-dev