Skip to content

Draft: Skip needless checks before emitting warnings (#19653)

Elliot Marsden requested to merge eddiejessup/ghc:master into master

Remove checks for which warning options are set, before issuing the relevant warnings. These checks are no longer semantically needed, because !5207 (closed) means we'll suppress warnings regardless if the option is set accordingly.

The changes exposed some places where booly-branching functions were being called like when True x, so I simplified these calls to just call x. This meant some utility functions were no longer used, so I removed them.

See the diff for more details.

  • are either individually buildable or squashed
  • have commit messages which describe what they do (referring to [Notes][notes] and tickets using #NNNN syntax when appropriate)
  • have added source comments describing your change. For larger changes you likely should add a [Note][notes] and cross-reference it from the relevant places.
  • [-] add a testcase to the testsuite.
Edited by Ben Gamari

Merge request reports