summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/Store.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-05 02:18:06 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-05 02:18:06 +0000
commitacd71a456254f3b4b1f9a860ab09f93026b1e0ef (patch)
tree4c9fa59f091f7744526ca1ebd231c3b8ae79abf8 /clang/lib/Analysis/Store.cpp
parenta0e1ee828a071b619324cab8ae438c7c3d5198d2 (diff)
downloadbcm5719-llvm-acd71a456254f3b4b1f9a860ab09f93026b1e0ef.tar.gz
bcm5719-llvm-acd71a456254f3b4b1f9a860ab09f93026b1e0ef.zip
Make static analysis support for C++ 'this' expression context-sensitive. Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it.
llvm-svn: 92675
Diffstat (limited to 'clang/lib/Analysis/Store.cpp')
-rw-r--r--clang/lib/Analysis/Store.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Analysis/Store.cpp b/clang/lib/Analysis/Store.cpp
index 8d911b844fc..4d150230013 100644
--- a/clang/lib/Analysis/Store.cpp
+++ b/clang/lib/Analysis/Store.cpp
@@ -77,6 +77,7 @@ const MemRegion *StoreManager::CastRegion(const MemRegion *R, QualType CastToTy)
// Process region cast according to the kind of the region being cast.
switch (R->getKind()) {
+ case MemRegion::CXXThisRegionKind:
case MemRegion::GenericMemSpaceRegionKind:
case MemRegion::StackLocalsSpaceRegionKind:
case MemRegion::StackArgumentsSpaceRegionKind:
@@ -240,8 +241,3 @@ SVal StoreManager::getLValueCompoundLiteral(const CompoundLiteralExpr* CL,
const LocationContext *LC) {
return loc::MemRegionVal(MRMgr.getCompoundLiteralRegion(CL, LC));
}
-
-Loc StoreManager::getThisObject(QualType T) {
- const CXXObjectRegion *R = MRMgr.getCXXObjectRegion(T);
- return loc::MemRegionVal(R);
-}
OpenPOWER on IntegriCloud