diff options
Diffstat (limited to 'lib/Checker/GRCoreEngine.cpp')
-rw-r--r-- | lib/Checker/GRCoreEngine.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Checker/GRCoreEngine.cpp b/lib/Checker/GRCoreEngine.cpp index 6b7a2cb812..8b30a86ee2 100644 --- a/lib/Checker/GRCoreEngine.cpp +++ b/lib/Checker/GRCoreEngine.cpp @@ -159,8 +159,16 @@ bool GRCoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps, GenerateNode(StartLoc, InitState, 0); } - while (Steps && WList->hasWork()) { - --Steps; + // Check if we have a steps limit + bool UnlimitedSteps = Steps == 0; + + while (WList->hasWork()) { + if (!UnlimitedSteps) { + if (Steps == 0) + break; + --Steps; + } + const GRWorkListUnit& WU = WList->Dequeue(); // Set the current block counter. |