[PATCH] D43737: Improve -Winfinite-recursion
Robert Widmann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 27 21:54:01 PST 2018
CodaFi added a comment.
> Can you explain the new algorithm for checking recursive calls?
The idea is to de-clutter as much of the existing algorithm as possible. The state dictionary is done away with now in favor of just not enqueueing successors of CFG blocks that have recursive calls. Given an arbitrary CFG, the algorithm attempts DFS for a path from the entry node to the exit node - terminating search on any path dominated by a recursive call.
> but it doesn't trigger the warning.
There's a condition around the reachability of the exit node hindering that that I didn't want to touch. I believe you were around this code last, so can you remember why it was there?
https://reviews.llvm.org/D43737
More information about the cfe-commits
mailing list