aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRState.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-12-01 17:50:25 +0000
committerTed Kremenek <kremenek@apple.com>2009-12-01 17:50:25 +0000
commit43f19f779e690f0f2c07b4cee7307d7df69dc9d5 (patch)
treede70808010719c55450f803444d23b1d866244a0 /lib/Analysis/GRState.cpp
parent32d4d80c26e8c4c1922cff4661e0b9f44a3aabfc (diff)
Fix early-return logic in scanReachableSymbols() to match the rest of the recursive logic in the methods of ScanReachableSymbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRState.cpp')
-rw-r--r--lib/Analysis/GRState.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index a56859dde5..7415fa5f67 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -312,10 +312,10 @@ bool GRState::scanReachableSymbols(const SVal *I, const SVal *E,
SymbolVisitor &visitor) const {
ScanReachableSymbols S(this, visitor);
for ( ; I != E; ++I) {
- if (S.scan(*I))
- return true;
+ if (!S.scan(*I))
+ return false;
}
- return false;
+ return true;
}
bool GRState::scanReachableSymbols(const MemRegion * const *I,
@@ -323,10 +323,10 @@ bool GRState::scanReachableSymbols(const MemRegion * const *I,
SymbolVisitor &visitor) const {
ScanReachableSymbols S(this, visitor);
for ( ; I != E; ++I) {
- if (S.scan(*I))
- return true;
+ if (!S.scan(*I))
+ return false;
}
- return false;
+ return true;
}
//===----------------------------------------------------------------------===//