<div class="gmail_quote">W dniu 6 września 2010 05:37 użytkownik Zhongxing Xu <span dir="ltr"><<a href="mailto:xuzhongxing@gmail.com">xuzhongxing@gmail.com</a>></span> napisał:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Marcin,<br><br>Thank you for working on this. This patch is really big. I suggest we focus on the 'CFGElement' aspect in the first patch, and put the 'LocalScope' things in later patches.<br><br>About CFGElement, I think we an avoid using two pointers in it. Currently the second pointer data is used for 'the statement that triggers the dtor. I think we don't need a pointer for it. The position where the CFGElement resides is the place where it is triggered. It is not triggered by a statement. <br>
<br>Then for the rest one pointer, we let it point to the VarDecl for AutomaticObjectDtor, to the initializer for Base and Member dtors, to CXXBindTemporaryExpr for temporary dtor.<br><br><div class="gmail_quote">2010/9/3 Marcin Świderski <span dir="ltr"><<a href="mailto:marcin.sfider@gmail.com" target="_blank">marcin.sfider@gmail.com</a>></span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Hi<div><br></div><div>I'm sending a patch with implementation of C++</div><div>- initializers from constructor initialization list,</div><div>- implicit destructors for objects with automatic storage duration.</div><div>
<br></div><div>For destructors I've taken care of:</div><div>- block local scopes,</div><div>- if/switch/for/while/do local scopes (in case there's no block),</div><div>- if/switch/for/while condition variables,</div>
<div>- catch exception variable,</div><div>- temporaries bound to const reference.</div><div><br></div><div>Is there something that I've missed?</div><div><br></div><div>As it have been suggested I've created hierarchy of CFGElements. Currently there're two unused types for implicit destructor calls in destructor. I've did not revert ability of CFGElement to cast/dyn_cast to Stmt, because it would lead to situation when cast<Stmt>(SomeCFGElement) would return null. I did however add method for downcasting CFGElement object to object of its implemntation class (returned by value, not pointer) with returning invalid object on invalid cast.</div>
<div><br></div><div>I did not add CFGElement for destructors of temporary objects. After giving it some thought I came to a conclusion that it shouldn't be covered by CFG, because it clearly needs path-sensitiveness.</div>
<div><br></div><div>Cheers</div><div>Marcin</div>
</blockquote></div></div></div><br>
</blockquote></div>Should I split it and send it cfe-commits with some comments?