diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-01-05 02:18:06 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-01-05 02:18:06 +0000 |
commit | de0d26310191215a6d1d189dc419f87af18ce6be (patch) | |
tree | cc02b6955e8dccac16a1af71f81a404044c5a2d0 /lib/Analysis/Store.cpp | |
parent | 6ffe643322949dd776285a6df60d3578f3918be4 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Store.cpp')
-rw-r--r-- | lib/Analysis/Store.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Analysis/Store.cpp b/lib/Analysis/Store.cpp index 8d911b844f..4d15023001 100644 --- a/lib/Analysis/Store.cpp +++ b/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); -} |