[cfe-commits] r90245 - /cfe/trunk/lib/Analysis/GRState.cpp
Ted Kremenek
kremenek at apple.com
Tue Dec 1 09:50:26 PST 2009
Author: kremenek
Date: Tue Dec 1 11:50:25 2009
New Revision: 90245
URL: http://llvm.org/viewvc/llvm-project?rev=90245&view=rev
Log:
Fix early-return logic in scanReachableSymbols() to match the rest of the recursive logic in the methods of ScanReachableSymbols.
Modified:
cfe/trunk/lib/Analysis/GRState.cpp
Modified: cfe/trunk/lib/Analysis/GRState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRState.cpp?rev=90245&r1=90244&r2=90245&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRState.cpp (original)
+++ cfe/trunk/lib/Analysis/GRState.cpp Tue Dec 1 11:50:25 2009
@@ -312,10 +312,10 @@
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 @@
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;
}
//===----------------------------------------------------------------------===//
More information about the cfe-commits
mailing list