[flang] Handle unsupported warning flags
authorEthan Luis McDonough <ethanluismcdonough@gmail.com>
Tue, 21 Feb 2023 22:09:34 +0000 (16:09 -0600)
committerEthan Luis McDonough <ethanluismcdonough@gmail.com>
Tue, 21 Feb 2023 22:14:19 +0000 (16:14 -0600)
commitce3a1c59e18027e7d18a2a0a99e4bc81ccc03491
tree5ac96f018c720e6e8f25cb960ee9dbfa8a8363cc
parentae2322a0dca9f8c39b1db51756c7155610fe668a
[flang] Handle unsupported warning flags

This PR makes flang emit a warning when the user passes an unsupported gfortran warning flag in as a CLI arg.  This PR also checks each `-W` argument instead of just looking at the last one passed in.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D143301
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Flang.cpp
flang/docs/FlangDriver.md
flang/lib/Frontend/CompilerInvocation.cpp
flang/test/Driver/w-arg-unsupported.f90 [new file with mode: 0644]
flang/test/Driver/werror-all.f90 [new file with mode: 0644]
flang/test/Driver/wextra-ok.f90 [new file with mode: 0644]