[cfe-commits] [PATCH] VisitInitListExpr
Zhongxing Xu
xuzhongxing at gmail.com
Wed Oct 29 21:29:17 PDT 2008
On Thu, Oct 30, 2008 at 12:25 PM, Ted Kremenek <kremenek at apple.com> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081030/1b7d1421/attachment.html>
More information about the cfe-commits
mailing list