aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRCoreEngine.cpp
diff options
context:
space:
mode:
authorTom Care <tom.care@uqconnect.edu.au>2010-09-29 23:48:13 +0000
committerTom Care <tom.care@uqconnect.edu.au>2010-09-29 23:48:13 +0000
commitcf9ce13774dad86f780d84cd41e6bd64c039324a (patch)
treefd1667b24c462d45edb9e9ecb38e5c89a460bddd /lib/Checker/GRCoreEngine.cpp
parentaca745b8b2eb58dc149ea7e65dfe133df2b0ab93 (diff)
Change -analyzer-max-nodes to allow 0 as a parameter. This allows the analyzer to completely analyze a worklist regardless of time taken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRCoreEngine.cpp')
-rw-r--r--lib/Checker/GRCoreEngine.cpp12
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.