r234685 - clang-cl: support -fno-color-diagnostics (PR23109)

Nico Weber thakis at chromium.org
Sat Apr 11 16:40:10 PDT 2015


Instead of doing this, should we expose the gcc spelling
-fno-diagnostic-color? The there would be a single option to disable colors
that worked with gcc, clang, and clang-cl.
On Apr 11, 2015 5:31 AM, "Hans Wennborg" <hans at hanshq.net> wrote:

> Author: hans
> Date: Sat Apr 11 07:27:56 2015
> New Revision: 234685
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234685&view=rev
> Log:
> clang-cl: support -fno-color-diagnostics (PR23109)
>
> Patch by Bernard Solomon, tests by me.
>
> Modified:
>     cfe/trunk/include/clang/Driver/Options.td
>     cfe/trunk/test/Driver/cl-options.c
>
> Modified: cfe/trunk/include/clang/Driver/Options.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=234685&r1=234684&r2=234685&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Driver/Options.td (original)
> +++ cfe/trunk/include/clang/Driver/Options.td Sat Apr 11 07:27:56 2015
> @@ -734,7 +734,8 @@ def fno_math_builtin : Flag<["-"], "fno-
>    HelpText<"Disable implicit builtin knowledge of math functions">;
>  def fno_caret_diagnostics : Flag<["-"], "fno-caret-diagnostics">,
> Group<f_Group>,
>   Flags<[CC1Option]>;
> -def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">,
> Group<f_Group>;
> +def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">,
> Group<f_Group>,
> +  Flags<[CoreOption, CC1Option]>;
>  def fno_diagnostics_color : Flag<["-"], "fno-diagnostics-color">,
> Group<f_Group>;
>  def fno_common : Flag<["-"], "fno-common">, Group<f_Group>,
> Flags<[CC1Option]>,
>      HelpText<"Compile common globals like normal definitions">;
>
> Modified: cfe/trunk/test/Driver/cl-options.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=234685&r1=234684&r2=234685&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/cl-options.c (original)
> +++ cfe/trunk/test/Driver/cl-options.c Sat Apr 11 07:27:56 2015
> @@ -346,6 +346,8 @@
>  // (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)
>  // RUN: %clang_cl \
>  // RUN:     --driver-mode=cl \
> +// RUN:     -fcolor-diagnostics \
> +// RUN:     -fno-color-diagnostics \
>  // RUN:     -ferror-limit=10 \
>  // RUN:     -fmsc-version=1800 \
>  // RUN:     -fno-strict-aliasing \
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150411/9b405d36/attachment.html>


More information about the cfe-commits mailing list