[cfe-commits] r58595 - in /cfe/trunk: include/clang/Analysis/PathSensitive/MemRegion.h lib/Analysis/MemRegion.cpp

Zhongxing Xu xuzhongxing at gmail.com
Sun Nov 2 21:10:35 PST 2008


On Mon, Nov 3, 2008 at 12:50 PM, Ted Kremenek <kremenek at apple.com> wrote:

> On Nov 2, 2008, at 8:12 PM, Zhongxing Xu wrote:
>
>  - Remove AnonTypedRegion, which is not to be used.
>>
>
> Hi Zhongxing,
>
> I actually do think that there will be uses of this; I'm not certain why
> you removed it.  What's your reasoning?  My idea for AnonTypedRegion was to
> actually assigning type information to a previously untyped array of bytes.
>  For example:
>
> int* p = (int*) alloca(20 * sizeof(int));
>
> In this case alloc returns an AllocaRegion (which has no type information).
>  The cast essentially layers a region on top of it, which is what
> AnonTypedRegion was intended to be used for.


I added  before to let AnonPointeeRegion to subclass it. Now I find
AnonPointeeRegion can get its type from its VarDecl, so I removed it because
it's not used in other places. Feel free to add it when you use it.


>
>
> I guess in general we should only add regions once we have a specific need
> for them.  This actually justifies removing AnonTypedRegion (at least for
> now), but honestly I was just about to use it.
>
> We should also probably start putting Store-specific regions in
> BasicStore.cpp. RegionStore.cpp, etc. if we can.
>

Agree.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081103/34293e94/attachment.html>


More information about the cfe-commits mailing list