From df24000d2495ede0ea449c03a831b40e522082c9 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sat, 11 Apr 2009 00:11:10 +0000 Subject: 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 --- clang/lib/Analysis/MemRegion.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'clang/lib/Analysis/MemRegion.cpp') 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(R); } - + return false; } + + +//===----------------------------------------------------------------------===// +// View handling. +//===----------------------------------------------------------------------===// + +const MemRegion *TypedViewRegion::removeViews() const { + const SubRegion *SR = this; + const MemRegion *R = SR; + while (SR && isa(SR)) { + R = SR->getSuperRegion(); + SR = dyn_cast(R); + } + return R; +} -- cgit v1.2.3