Change -analyzer-max-nodes to allow 0 as a parameter. This allows the analyzer to completely analyze a worklist regardless of time taken.
llvm-svn: 115108
diff --git a/clang/lib/Checker/GRCoreEngine.cpp b/clang/lib/Checker/GRCoreEngine.cpp
index 6b7a2cb..8b30a86 100644
--- a/clang/lib/Checker/GRCoreEngine.cpp
+++ b/clang/lib/Checker/GRCoreEngine.cpp
@@ -159,8 +159,16 @@
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.