diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-04 00:13:10 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-04 00:13:10 +0000 |
commit | 19df925f6b1a2e83128830467700141aaefeeb1b (patch) | |
tree | d03d65bd532f0484bdf6b68d75c483bedb2e7649 /clang/lib/Analysis | |
parent | 67c710e2c882943fca09469b4568e59015008cef (diff) | |
download | bcm5719-llvm-19df925f6b1a2e83128830467700141aaefeeb1b.tar.gz bcm5719-llvm-19df925f6b1a2e83128830467700141aaefeeb1b.zip |
Add "GetSValAsScalarOrLoc" methods to GRState/GRStateRef that only perform a
retrieval from the store/environment for locations or scalar types.
llvm-svn: 65982
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r-- | clang/lib/Analysis/GRState.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Analysis/GRState.cpp b/clang/lib/Analysis/GRState.cpp index eb6b1b5cfaa..85a85f207d8 100644 --- a/clang/lib/Analysis/GRState.cpp +++ b/clang/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. |