diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-12-01 17:50:25 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-12-01 17:50:25 +0000 |
| commit | d3a241a9c66e630814cb098c2d08e2d372c9faf3 (patch) | |
| tree | b8fff073f48b82559006f8700f15cdf774966b4d /clang/lib | |
| parent | 4886c8154d875b3ff1b120f4a1008d356a7f91eb (diff) | |
| download | bcm5719-llvm-d3a241a9c66e630814cb098c2d08e2d372c9faf3.tar.gz bcm5719-llvm-d3a241a9c66e630814cb098c2d08e2d372c9faf3.zip | |
Fix early-return logic in scanReachableSymbols() to match the rest of the recursive logic in the methods of ScanReachableSymbols.
llvm-svn: 90245
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Analysis/GRState.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Analysis/GRState.cpp b/clang/lib/Analysis/GRState.cpp index a56859dde5b..7415fa5f67e 100644 --- a/clang/lib/Analysis/GRState.cpp +++ b/clang/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; } //===----------------------------------------------------------------------===// |

