[cfe-commits] [PATCH] VisitInitListExpr

Ted Kremenek kremenek at apple.com
Wed Oct 29 21:25:02 PDT 2008


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.



More information about the cfe-commits mailing list