Commit 3483c3de authored by Alfredo Di Napoli's avatar Alfredo Di Napoli Committed by Marge Bot

Correct warning for deprecated and unrecognised flags

Fixes #19616.

This commit changes the `GHC.Driver.Errors.handleFlagWarnings` function
to rely on the newly introduced `DiagnosticReason`. This allows us to
correctly pretty-print the flags which triggered some warnings and in
turn remove the cruft around this function (like the extra filtering
and the `shouldPrintWarning` function.
parent 49528121
Pipeline #33970 canceled with stages
in 31 seconds