<br><br><div class="gmail_quote">On Thu, Jun 3, 2010 at 1:02 PM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="word-wrap: break-word;"><div class="im"><br><div><div>On Jun 2, 2010, at 9:48 PM, Zhongxing Xu wrote:</div><br><blockquote type="cite"><span style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Is it necessary to add all RHS of assignment expr as block-level expr?<br><br>+ return addStmt(B->getLHS(), AddStmtChoice::AsLValueNotAlwaysAdd);<br>+ }<br></blockquote><div><br>Here better to use visitStmt, because addStmt() means we want to 'add' the statement. Maybe we should modify some of the existing code to emphasize this.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> </blockquote></span></blockquote></div><div><br></div></div><div>That's right. The rest of the cases in that method use addStmt() because they introduce real control-flow dependencies. For the assignment operator this isn't need.</div>
<div><br></div><div>Zhongxing: I don't think any of the existing cases in that method need to be modified to use VisitStmt() instead of addStmt(), or do you see something?</div></div></blockquote></div><br>I suggest the following implementation of addStmt.<br>
<br>CFGBlock *addStmt(Stmt *S) {<br> return Visit(S, AddStmtChoice::AlwaysAdd);<br>}<br>