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

Ted Kremenek kremenek at apple.com
Wed Feb 4 21:13:48 PST 2009


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.



More information about the cfe-dev mailing list