This is an archive of the discontinued LLVM Phabricator instance.

Restore Check for Unreachable Exit Block in -Winfinite-recursion
ClosedPublic

Authored by CodaFi on Feb 12 2019, 7:39 AM.

Details

Summary

When this was rewritten in D43737, the logic changed to better explore infinite loops. The check for a reachable exit block was deleted which accidentally introduced false positives in case the exit node was unreachable.

We were testing for cases like this, but @steven_wu provided an additional test case that I've included in the regression tests for this patch.

Diff Detail

Repository
rC Clang

Event Timeline

CodaFi created this revision.Feb 12 2019, 7:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2019, 7:39 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rtrieu accepted this revision.Feb 12 2019, 4:14 PM

LGTM

This revision is now accepted and ready to land.Feb 12 2019, 4:14 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2019, 2:21 PM