On Oct 29, 2008, at 9:29 PM, Zhongxing Xu wrote:



On Thu, Oct 30, 2008 at 12:25 PM, Ted Kremenek <[EMAIL PROTECTED]> wrote:

On Oct 29, 2008, at 9:17 PM, Zhongxing Xu wrote:

if (Loc::isLocType(T) || T->isIntegerType()) {
 assert (E->getNumInits() == 1);
 NodeSet Tmp;
 Expr* Init = E->getInit(0);
 Visit(Tmp, Init, Pred, state);
 for (NodeSet::iterator I=Tmp.begin(), EI=Tmp.end(); I!+EI; ++I)
  MakeNode(Dst, E, *I, SetSVal(state, Ex, GetSVal(state, Init)));
}


Great. Added to my patch.

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).

Other than unions, structs, and arrays, are there any other "compound" cases? If so, we can just drop the "if" here.

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.

Sounds reasonable!
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to