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" <[email protected]> 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 > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
