[cfe-commits] r106868 - /cfe/trunk/lib/Checker/RegionStore.cpp

Tom Care tcare at apple.com
Fri Jun 25 11:22:31 PDT 2010


Author: tcare
Date: Fri Jun 25 13:22:31 2010
New Revision: 106868

URL: http://llvm.org/viewvc/llvm-project?rev=106868&view=rev
Log:
Change RegionStoreManager::Retrieve to infer the type of a symbolic region from the context when it is not already available.

Modified:
    cfe/trunk/lib/Checker/RegionStore.cpp

Modified: cfe/trunk/lib/Checker/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RegionStore.cpp?rev=106868&r1=106867&r2=106868&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/RegionStore.cpp (original)
+++ cfe/trunk/lib/Checker/RegionStore.cpp Fri Jun 25 13:22:31 2010
@@ -1022,8 +1022,13 @@
 
   const MemRegion *MR = cast<loc::MemRegionVal>(L).getRegion();
 
-  if (isa<AllocaRegion>(MR) || isa<SymbolicRegion>(MR))
+  if (isa<AllocaRegion>(MR) || isa<SymbolicRegion>(MR)) {
+    if (T.isNull()) {
+      const SymbolicRegion *SR = cast<SymbolicRegion>(MR);
+      T = SR->getSymbol()->getType(getContext());
+    }
     MR = GetElementZeroRegion(MR, T);
+  }
 
   if (isa<CodeTextRegion>(MR)) {
     assert(0 && "Why load from a code text region?");





More information about the cfe-commits mailing list