]> granicus.if.org Git - clang/commitdiff
Temporarily revert 91553.
authorTed Kremenek <kremenek@apple.com>
Wed, 16 Dec 2009 19:46:44 +0000 (19:46 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 16 Dec 2009 19:46:44 +0000 (19:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91557 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicStore.cpp

index 237c1f9bf435e41eec5d219b02d66c462ff9d041..a38aaa7eb268cc53ea9dca79575adc9ef24e8016 100644 (file)
@@ -479,11 +479,15 @@ Store BasicStoreManager::getInitialStore(const LocationContext *InitLoc) {
       const Decl& CD = *InitLoc->getDecl();
       if (const ObjCMethodDecl* MD = dyn_cast<ObjCMethodDecl>(&CD)) {
         if (MD->getSelfDecl() == PD) {
-          // FIXME: Add type constraints (when they become available) to
-          // SelfRegion?  (i.e., it implements MD->getClassInterface()).
-          const MemRegion *SelfRegion = MRMgr.getVarRegion(PD, InitLoc);
-          St = BindInternal(St, ValMgr.makeLoc(SelfRegion),
-                            ValMgr.getRegionValueSymbolVal(SelfRegion));
+          // FIXME: Just use a symbolic region, and remove ObjCObjectRegion
+          // entirely.
+          const ObjCObjectRegion *SelfRegion =
+            MRMgr.getObjCObjectRegion(MD->getClassInterface(),
+                                      MRMgr.getHeapRegion());
+
+          St = BindInternal(St, ValMgr.makeLoc(MRMgr.getVarRegion(PD, InitLoc)),
+                            ValMgr.makeLoc(SelfRegion));
+
           // Scan the method for ivar references.  While this requires an
           // entire AST scan, the cost should not be high in practice.
           St = scanForIvars(MD->getBody(), PD, SelfRegion, St);