rtrieu added a comment.

Two more changes, then everything is good to commit.



================
Comment at: lib/Sema/AnalysisBasedWarnings.cpp:218-220
+    // Found a path to the exit node without a recursive call.
+    if (ExitID == Block->getBlockID())
+      return false;
----------------
Move this to checking the ID of the successor block instead of the current 
block.


================
Comment at: lib/Sema/AnalysisBasedWarnings.cpp:227-233
+        // If the successor block contains a recursive call, end analysis 
there.
+        if (!hasRecursiveCallInPath(FD, *SuccBlock)) {
+          WorkList.push_back(SuccBlock);
+          continue;
         }
+
+        foundRecursion = true;
----------------
This would make more sense if you flip the conditional:


```
if (hasRecursiveCallInPath(FD, *SuccBlock)) {
  foundRecursion = true;
  continue;
}

WorkList.push_back(SuccBlock);
```


https://reviews.llvm.org/D43737



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to