return BindExpr(St, Ex, V, isBlkExpr, Invalidate);
}
- SVal ArrayToPointer(SVal Array) {
+ SVal ArrayToPointer(Loc Array) {
return StoreMgr->ArrayToPointer(Array);
}
/// ArrayToPointer - Used by GRExprEngine::VistCast to handle implicit
/// conversions between arrays and pointers.
- virtual SVal ArrayToPointer(SVal Array) = 0;
+ virtual SVal ArrayToPointer(Loc Array) = 0;
class CastResult {
/// ArrayToPointer - Used by GRExprEngine::VistCast to handle implicit
/// conversions between arrays and pointers.
- SVal ArrayToPointer(SVal Array) { return Array; }
+ SVal ArrayToPointer(Loc Array) { return Array; }
/// CastRegion - Used by GRExprEngine::VisitCast to handle casts from
/// a MemRegion* to a specific location type. 'R' is the region being
// Check for casts from array type to another type.
if (ExTy->isArrayType()) {
// We will always decay to a pointer.
- V = StateMgr.ArrayToPointer(V);
+ V = StateMgr.ArrayToPointer(cast<Loc>(V));
// Are we casting from an array to a pointer? If so just pass on
// the decayed value.
/// version of that lvalue (i.e., a pointer to the first element of
/// the array). This is called by GRExprEngine when evaluating
/// casts from arrays to pointers.
- SVal ArrayToPointer(SVal Array);
+ SVal ArrayToPointer(Loc Array);
/// CastRegion - Used by GRExprEngine::VisitCast to handle casts from
/// a MemRegion* to a specific location type. 'R' is the region being
/// version of that lvalue (i.e., a pointer to the first element of
/// the array). This is called by GRExprEngine when evaluating casts
/// from arrays to pointers.
-SVal RegionStoreManager::ArrayToPointer(SVal Array) {
- // FIXME: This should be factored into GRExprEngine. This allows
- // us to pass a "loc" instead of an "SVal" for "Array".
- if (Array.isUnknownOrUndef())
- return Array;
-
+SVal RegionStoreManager::ArrayToPointer(Loc Array) {
if (!isa<loc::MemRegionVal>(Array))
return UnknownVal();