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 | df24000d2495ede0ea449c03a831b40e522082c9 (patch) | |
tree | e497a43038bdaf73a06c3b5c385cd31a56aa5f6f /clang/lib/Analysis/MemRegion.cpp | |
parent | d381cde486ae31e91282d04bc2104e9fd2b9853c (diff) | |
download | bcm5719-llvm-df24000d2495ede0ea449c03a831b40e522082c9.tar.gz bcm5719-llvm-df24000d2495ede0ea449c03a831b40e522082c9.zip |
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.
llvm-svn: 68845
Diffstat (limited to 'clang/lib/Analysis/MemRegion.cpp')
-rw-r--r-- | clang/lib/Analysis/MemRegion.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/clang/lib/Analysis/MemRegion.cpp b/clang/lib/Analysis/MemRegion.cpp index c8a43a556da..0990767378c 100644 --- a/clang/lib/Analysis/MemRegion.cpp +++ b/clang/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; +} |