Hi<div><br></div><div>I'm currently working on modeling destructors of temporary objects in CFG. I've attached patch with prototype implementation and some tests.</div><div><br></div><div>After some thinking I've decided to add additional step with forward traversing of AST for every CXXExprWithTemporaries node. During this step destructors are added to CFG for every CXXBindTemporaryExpr (with special case for binding const reference to temporary). However I have a problem with branching for destructors that have to be called conditionaly. Blocks structure that is constructed is fine, but I don't know what to use for terminator of block initiating the branch and for first element in block closing the branch (I didn't check this yet, but I think that it could be used during backward analysis). Could I use fake if/else statement for this? Similar solution is used to make every declaration into separate statement.</div>
<div><br></div><div>- Marcin</div>