aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRState.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-04 00:13:10 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-04 00:13:10 +0000
commit1cb151eadee0ef1944bd9a16aa4348ead7160259 (patch)
tree7f4b40fea12d587c94152a4fbd7768d0f8b9d838 /lib/Analysis/GRState.cpp
parent02c4d2d3835ccc744f2092885256ec5ee1498be3 (diff)
Add "GetSValAsScalarOrLoc" methods to GRState/GRStateRef that only perform a
retrieval from the store/environment for locations or scalar types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRState.cpp')
-rw-r--r--lib/Analysis/GRState.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index eb6b1b5cfa..85a85f207d 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -257,7 +257,7 @@ bool ScanReachableSymbols::scan(SVal val) {
}
bool ScanReachableSymbols::scan(const MemRegion *R) {
- if (visited.count(R))
+ if (isa<MemSpaceRegion>(R) || visited.count(R))
return true;
visited.insert(R);
@@ -273,7 +273,7 @@ bool ScanReachableSymbols::scan(const MemRegion *R) {
return false;
// Now look at the binding to this region (if any).
- if (!scan(state.GetSVal(R)))
+ if (!scan(state.GetSValAsScalarOrLoc(R)))
return false;
// Now look at the subregions.