[PATCH] D143301: Emit warning for unsupported gfortran flags

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 14 10:21:04 PST 2023


jdoerfert added a comment.

Split this into two patches/reviews. I think the -W stuff can go in, it has tests and is reasonable. The other stuff needs tests too.



================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:607
   if (args.hasArg(clang::driver::options::OPT_W_Joined)) {
-    if (args.getLastArgValue(clang::driver::options::OPT_W_Joined)
-            .equals("error")) {
-      res.setWarnAsErr(true);
-    } else {
-      const unsigned diagID =
-          diags.getCustomDiagID(clang::DiagnosticsEngine::Error,
-                                "Only `-Werror` is supported currently.");
-      diags.Report(diagID);
+    const auto wArgs =
+        args.getAllArgValues(clang::driver::options::OPT_W_Joined);
----------------
Probably


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143301/new/

https://reviews.llvm.org/D143301



More information about the cfe-commits mailing list