summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/T11429c.stderr
Commit message (Collapse)AuthorAgeFilesLines
* Mention which -Werror promoted a warning to an errorÖmer Sinan Ağacan2017-07-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously -Werror or -Werror=flag printed warnings as usual and then printed these two lines: <no location info>: error: Failing due to -Werror. This is not ideal: first, it's not clear which flag made one of the warnings an error. Second, warning messages are not modified in any way, so there's no way to know which warnings caused this error. With this patch we (1) promote warning messages to error messages if a relevant -Werror is enabled (2) mention which -Werror is used during this promotion. Previously: [1 of 1] Compiling Main ( test.hs, test.o ) test.hs:9:10: warning: [-Wincomplete-patterns] Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: (C2 _) | 9 | sInt s = case s of | ^^^^^^^^^... test.hs:12:14: warning: [-Wmissing-fields] • Fields of ‘Rec’ not initialised: f2 • In the first argument of ‘print’, namely ‘Rec {f1 = 1}’ In the expression: print Rec {f1 = 1} In an equation for ‘main’: main = print Rec {f1 = 1} | 12 | main = print Rec{ f1 = 1 } | ^^^^^^^^^^^^^ <no location info>: error: Failing due to -Werror. Now: [1 of 1] Compiling Main ( test.hs, test.o ) test.hs:9:10: error: [-Wincomplete-patterns, -Werror=incomplete-patterns] Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: (C2 _) | 9 | sInt s = case s of | ^^^^^^^^^... test.hs:12:14: error: [-Wmissing-fields, -Werror=missing-fields] • Fields of ‘Rec’ not initialised: f2 • In the first argument of ‘print’, namely ‘Rec {f1 = 1}’ In the expression: print Rec {f1 = 1} In an equation for ‘main’: main = print Rec {f1 = 1} | 12 | main = print Rec{ f1 = 1 } | ^^^^^^^^^^^^^ Test Plan: - Update old tests, add new tests if there aren't any relevant tests Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3709
* Implement -Wunrecognised-warning-flagBen Gamari2016-01-251-0/+5
This allows the user to avoid warnings for warning flags that GHC doesn't recognise. See #11429 for details.. Test Plan: Validate with T11429[abc] tests Reviewers: austin, hvr Reviewed By: hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1830 GHC Trac Issues: #11429