Implement a FIXME.
llvm-svn: 68024
diff --git a/clang/lib/Analysis/BasicStore.cpp b/clang/lib/Analysis/BasicStore.cpp
index 8c5b71f..cb6fcab 100644
--- a/clang/lib/Analysis/BasicStore.cpp
+++ b/clang/lib/Analysis/BasicStore.cpp
@@ -85,7 +85,7 @@
/// 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
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp
index 8241d13..41f6453 100644
--- a/clang/lib/Analysis/GRExprEngine.cpp
+++ b/clang/lib/Analysis/GRExprEngine.cpp
@@ -1877,7 +1877,7 @@
// 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.
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index 59891f2..6094806 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/lib/Analysis/RegionStore.cpp
@@ -199,7 +199,7 @@
/// 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
@@ -562,12 +562,7 @@
/// 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();