diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-11 00:11:10 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-11 00:11:10 +0000 |
commit | 1670e403c48f3af4fceff3f6773a0e1cfc6c4eb3 (patch) | |
tree | 3b1044513e874e7285fa3b8a874122286b97066b /lib/Analysis/MemRegion.cpp | |
parent | c2112181b96349eb595dc5e8b7073b81ecdec0db (diff) |
Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"
ProgramPoints all the way through to GRCoreEngine.
NSString.m now fails with RegionStoreManager because of the void** cast.
Disabling use of region store for that test for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemRegion.cpp')
-rw-r--r-- | lib/Analysis/MemRegion.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/Analysis/MemRegion.cpp b/lib/Analysis/MemRegion.cpp index c8a43a556d..0990767378 100644 --- a/lib/Analysis/MemRegion.cpp +++ b/lib/Analysis/MemRegion.cpp @@ -481,6 +481,21 @@ bool MemRegionManager::hasStackStorage(const MemRegion* R) { SR = dyn_cast<SubRegion>(R); } - + return false; } + + +//===----------------------------------------------------------------------===// +// View handling. +//===----------------------------------------------------------------------===// + +const MemRegion *TypedViewRegion::removeViews() const { + const SubRegion *SR = this; + const MemRegion *R = SR; + while (SR && isa<TypedViewRegion>(SR)) { + R = SR->getSuperRegion(); + SR = dyn_cast<SubRegion>(R); + } + return R; +} |