diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-08-06 04:20:59 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-08-06 04:20:59 +0000 |
commit | 68df730435f984cb61a41a98ffb5ab9b37490b7a (patch) | |
tree | 2bdfc9496a0d1ce6c7bab2c8355eaa32bfd613f3 /lib/Checker/GRExprEngine.cpp | |
parent | cd480ad90ff4c144084805761d2dfa52ee9e1c92 (diff) |
If all nodes are sunk, bail out early. This make the later check for checkersEvaluated really meaningful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRExprEngine.cpp')
-rw-r--r-- | lib/Checker/GRExprEngine.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index 4ecc75f105..5bca1ed206 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -205,7 +205,10 @@ void GRExprEngine::CheckerVisit(const Stmt *S, ExplodedNodeSet &Dst, ExplodedNodeSet *PrevSet = &Src; unsigned checkersEvaluated = 0; - for (CheckersOrdered::iterator I=CO->begin(), E=CO->end(); I!=E; ++I){ + for (CheckersOrdered::iterator I=CO->begin(), E=CO->end(); I!=E; ++I) { + // If all nodes are sunk, bail out early. + if (PrevSet->empty()) + break; ExplodedNodeSet *CurrSet = 0; if (I+1 == E) CurrSet = &Dst; |