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

Ted Kremenek kremenek at apple.com
Thu Nov 13 16:58:19 PST 2008

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081113/67142071/attachment.html>

More information about the cfe-commits mailing list