summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-12-16 19:46:44 +0000
committerTed Kremenek <kremenek@apple.com>2009-12-16 19:46:44 +0000
commit3ab9e4cf87e902aecbef20c3cd2fa211f2bab387 (patch)
tree7a3bc96881e91fc9f9d14713bafb3840b93aec0f /clang/lib/Analysis
parent69461f50c18306413ba30356e666d42dfb2d766a (diff)
downloadbcm5719-llvm-3ab9e4cf87e902aecbef20c3cd2fa211f2bab387.tar.gz
bcm5719-llvm-3ab9e4cf87e902aecbef20c3cd2fa211f2bab387.zip
Temporarily revert 91553.
llvm-svn: 91557
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/BasicStore.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/clang/lib/Analysis/BasicStore.cpp b/clang/lib/Analysis/BasicStore.cpp
index 237c1f9bf43..a38aaa7eb26 100644
--- a/clang/lib/Analysis/BasicStore.cpp
+++ b/clang/lib/Analysis/BasicStore.cpp
@@ -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);
OpenPOWER on IntegriCloud