<br><br><div class="gmail_quote">On Thu, Oct 30, 2008 at 12:11 PM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><br><div><div class="Ih2E3d"><div>On Oct 29, 2008, at 8:58 PM, Zhongxing Xu wrote:</div><br><blockquote type="cite"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; 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;"><div>
<div><Not certain if we need E->IngoreParens()->getInit().</div><br>Perhaps. We'd better have a consistent Parenthesis handle scheme. The current one looks ad hoc (or I haven't get it from the code?).</div>
</span></blockquote><div><br></div></div><div>I realized that it's actually not needed.   Visit() just ignores ParenExprs and visits the subexpression, and GetSVal also ignores ParenExprs and looks at their children.</div>
<div class="Ih2E3d"><div><br></div><blockquote type="cite"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; 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="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span style="color: rgb(20, 79, 174);">+</span></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">+  if (Loc::IsLocType(T) || T->isIntegerType()) {<br>
+    // FIXME: to be implemented.<br>+    MakeNode(Dst, E, Pred, state);<br>+    return;<br>+  }<br><br>Is this possible?  Can InitListExpr have one of these types?</blockquote><div><br>There is one example in test/Analysis/stack-addr-ps.c. In the last function.</div>
</span></blockquote></div></div><br><div>Right!  It seems to me that in this case the InitListExpr will contain only 1 scalar value, and we should just return the SVal for that.  So something like this:</div><div><br></div>
<div>if (Loc::isLocType(T) || T->isIntegerType()) {</div><div>  assert (E->getNumInits() == 1);</div><div>  NodeSet Tmp;</div><div>  Expr* Init = E->getInit(0);</div><div>  Visit(Tmp, Init, Pred, state);</div><div>
  for (NodeSet::iterator I=Tmp.begin(), EI=Tmp.end(); I!+EI; ++I)</div><div>   MakeNode(Dst, E, *I, SetSVal(state, Ex, GetSVal(state, Init)));</div><div>}</div><div><br></div><div><br></div></div></blockquote></div>Great. Added to my patch.<br>