<br><br><div class="gmail_quote">On Thu, Oct 30, 2008 at 12:25 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 class="Ih2E3d"><br>
On Oct 29, 2008, at 9:17 PM, Zhongxing Xu wrote:<br>
<br>
<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>
  assert (E->getNumInits() == 1);<br>
  NodeSet Tmp;<br>
  Expr* Init = E->getInit(0);<br>
  Visit(Tmp, Init, Pred, state);<br>
  for (NodeSet::iterator I=Tmp.begin(), EI=Tmp.end(); I!+EI; ++I)<br>
   MakeNode(Dst, E, *I, SetSVal(state, Ex, GetSVal(state, Init)));<br>
}<br>
<br>
<br>
Great. Added to my patch.<br>
</blockquote>
<br></div>
I just realized that the condition if(Loc::is:LocType(T) || T->isIntegerType()) is probably too strict, as this will work fine on any scalar value (or even a ComplexType).<br>
<br>
Other than unions, structs, and arrays, are there any other "compound" cases?  If so, we can just drop the "if" here.<br>
</blockquote></div><br>I don't know. But I prefer to keep the 'if' and the assertion for a while. Let's test the code and look at what strange things could come out.<br>