[cfe-dev] [SCA] Should the super region of the ElementRegion always be typed?

Zhongxing Xu xuzhongxing at gmail.com
Wed Feb 4 21:18:29 PST 2009


On Thu, Feb 5, 2009 at 1:13 PM, Ted Kremenek <kremenek at apple.com> wrote:

>
> On Feb 4, 2009, at 8:57 PM, Zhongxing Xu wrote:
>
>
>> If we do this, it would lead to a series of changes:
>>
>> To get the rvalue type of the region, we need to get the type of the
>> symbol. SymbolManager is required to do this: get the SymbolData by
>> SymbolRef. The interface need to be changed:
>>
>> TypedRegion::getRValueType(ASTContext&) ->
>> TypedRegion::getRValueType(ASTContext&, SymbolManager&)
>>
>> But this is not desired for other typed regions.
>>
>> Or, we can make getRValueType a method of MemRegionManager. But that would
>> need the access to MemRegionManager everywhere when we need the type of the
>> region.
>>
>
> A third option is to embed a reference to the SymbolManager in the
> SymbolicRegion.  One would need to pass it to
> MemRegionManager::getSymbolicRegion(), but I see only two callsites for this
> function (one in BasicStore, the other in RegionStore), and in both places
> we should have access to the SymbolManager.
>

Yeah, this is better.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090205/dbd1f825/attachment.html>


More information about the cfe-dev mailing list