[cfe-commits] r59232 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp

Zhongxing Xu xuzhongxing at gmail.com
Thu Nov 13 17:02:42 PST 2008


On Fri, Nov 14, 2008 at 8:58 AM, Ted Kremenek <kremenek at apple.com> wrote:

>
> On Nov 13, 2008, at 4:52 PM, Zhongxing Xu wrote:
>
> We'll need to iterate on this one.  We may end up applying your patch back,
>> so please don't take my reverting it personally.
>>
>> Consider:
>>
>> char* p = alloca(BLOCK);
>> new (p) Object1();
>> ...
>> new (p) Object2();
>>
>> Untyped memory can be recycled.  While this won't  occur that often, I
>> think with the right design we can handle such things naturally.
>>
>
> I agree that another indirection is necessary, since:
>  - We have no type information when creating AllocaRegion.
>  - We have to attach type information to AllocaRegion.
>  - Regions are immutable once created.
>
> The question remains is that when shall we create this indirect layer. A
> plausible time is when we have the type information, we create the indirect
> layer.
>
>
> A reasonable insertion point for such information is during VisitCast when
> the "interpretation" of a pointer changes.  We have a fair amount of
> flexibility in how we add such information because VisitCast can generate
> new GRStates.
>

Right.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081114/ed9f4438/attachment.html>


More information about the cfe-commits mailing list