[cfe-commits] r59957 - in /cfe/trunk: include/clang/Analysis/PathSensitive/Store.h lib/Analysis/GRExprEngine.cpp lib/Analysis/RegionStore.cpp

Zhongxing Xu xuzhongxing at gmail.com
Mon Nov 24 16:17:20 PST 2008

On Tue, Nov 25, 2008 at 3:03 AM, Ted Kremenek <kremenek at apple.com> wrote:

> Hi Zhongxing,
> Why use the GDM to represent the byte extent of an AllocaRegion instead of
> storing it directly in the region object itself?  I don't think it's
> necessarily a bad idea; I'm just curious about the overall design.

I don't have a definite reason for this. I feel that:

- The extent is not a necessary property of AllocaRegion (or the necessity
has not showed). If we make it part of the AllocaRegion, that would require
all clients provide an extent when creating the AllocaRegion.

- Decoupling the extent of the dynamically allocated region provides more
flexibility. Consider a MallocRegion, whose extent may be changed by a later
realloc(). But its store bindings may not change. In that case, we can only
modify the extent mapping of it.

- If later we find the extent is an essential property of AllocaRegion, we
can add it back.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081125/efc40df7/attachment.html>

More information about the cfe-commits mailing list