[flang-commits] [clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Thu Sep 19 06:53:57 PDT 2024


================
@@ -732,6 +732,12 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
   // to avoid warn_drv_unused_argument.
   Args.getLastArg(options::OPT_fcolor_diagnostics,
                   options::OPT_fno_color_diagnostics);
+  if (const Arg *A = Args.getLastArg(options::OPT_fdiagnostics_color_EQ)) {
+    StringRef Value(A->getValue());
+    if (Value != "always" && Value != "never" && Value != "auto")
+      D.Diag(diag::err_drv_invalid_argument_to_option)
+          << Value << A->getOption().getName();
+  }
----------------
tarunprabhu wrote:

It should. Done.

https://github.com/llvm/llvm-project/pull/109210


More information about the flang-commits mailing list