Page MenuHomePhabricator

[clang] Add -ffinite-loops & -fno-finite-loops options.
AbandonedPublic

Authored by fhahn on Feb 17 2021, 1:52 AM.

Details

Reviewers
None
Summary

This cherry-picks the following patches on the release branch:

6280bb4cd80e [clang] Remove redundant condition (NFC).
51bf4c0e6d4c [clang] Add -ffinite-loops & -fno-finite-loops options.
fb4d8fe80701 [clang] Update mustprogress tests

This patch adds 2 new options to control when Clang adds mustprogress:

  1. -ffinite-loops: assume all loops are finite; mustprogress is added to all loops, regardless of the selected language standard.
  2. -fno-finite-loops: assume no loop is finite; mustprogress is not added to any loop or function. We could add mustprogress to functions without loops, but we would have to detect that in Clang, which is probably not worth it.

Diff Detail

Event Timeline

fhahn created this revision.Feb 17 2021, 1:52 AM
fhahn requested review of this revision.Feb 17 2021, 1:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2021, 1:52 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
fhahn abandoned this revision.Mar 10 2021, 11:57 AM

those have been picked onto 12.x