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

Hans Wennborg hans at chromium.org
Sun Apr 12 00:17:37 PDT 2015


I'm not sure about doing them instead. -fcolor-diagnostics is a well
established Clang option after all. We can certainly have both,
though. I've committed r234702.

On Sun, Apr 12, 2015 at 12:40 AM, Nico Weber <thakis at chromium.org> wrote:
> 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
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



More information about the cfe-commits mailing list