[PATCH] D43737: Improve -Winfinite-recursion

Steven Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 7 11:34:28 PST 2019


steven_wu added a comment.
Herald added a project: LLVM.

Sorry for following up late on the patch. Removing the reachability testing for the exit block causes false positive for infinite loop cases like this:

  void l() {
    static int count = 5;
    if (count >0) {
      count--;
      l();
    }
    while (true) {}
  }

Can you take a look? I was attempting to write a fix but then I figure out it is very much the same as old algorithm.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D43737/new/

https://reviews.llvm.org/D43737





More information about the cfe-commits mailing list