summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Driver/Options.def2
-rw-r--r--clang/lib/Driver/Tools.cpp3
-rw-r--r--clang/tools/clang-cc/clang-cc.cpp2
3 files changed, 6 insertions, 1 deletions
diff --git a/clang/include/clang/Driver/Options.def b/clang/include/clang/Driver/Options.def
index 32b29cdf528..5da79c835f8 100644
--- a/clang/include/clang/Driver/Options.def
+++ b/clang/include/clang/Driver/Options.def
@@ -364,6 +364,7 @@ OPTION("-fblocks", fblocks, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fbootclasspath=", fbootclasspath_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fbuiltin", fbuiltin, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fclasspath=", fclasspath_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
+OPTION("-fcolor-diagnostics", fcolor_diagnostics, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fcommon", fcommon, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fcompile-resource=", fcompile_resource_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fconstant-cfstrings", fconstant_cfstrings, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
@@ -402,6 +403,7 @@ OPTION("-fno-asynchronous-unwind-tables", fno_asynchronous_unwind_tables, Flag,
OPTION("-fno-blocks", fno_blocks, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-builtin", fno_builtin, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-caret-diagnostics", fno_caret_diagnostics, Flag, f_Group, INVALID, "", 0, 0, 0)
+OPTION("-fno-color-diagnostics", fno_color_diagnostics, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-common", fno_common, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-constant-cfstrings", fno_constant_cfstrings, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-diagnostics-fixit-info", fno_diagnostics_fixit_info, Flag, f_Group, INVALID, "", 0, 0, 0)
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index eca64135bf6..68167e5cdc9 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -539,6 +539,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (Args.hasFlag(options::OPT_fdiagnostics_show_option,
options::OPT_fno_diagnostics_show_option))
CmdArgs.push_back("-fdiagnostics-show-option");
+ if (!Args.hasFlag(options::OPT_fcolor_diagnostics,
+ options::OPT_fno_color_diagnostics))
+ CmdArgs.push_back("-fno-color-diagnostics");
// -fdollars-in-identifiers default varies depending on platform and
// language; only pass if specified.
diff --git a/clang/tools/clang-cc/clang-cc.cpp b/clang/tools/clang-cc/clang-cc.cpp
index 9e6afdd9463..0a331a8f052 100644
--- a/clang/tools/clang-cc/clang-cc.cpp
+++ b/clang/tools/clang-cc/clang-cc.cpp
@@ -329,7 +329,7 @@ MessageLength("fmessage-length",
llvm::cl::value_desc("N"));
static llvm::cl::opt<bool>
-NoColorDiagnostic("fno-color-diagnostic",
+NoColorDiagnostic("fno-color-diagnostics",
llvm::cl::desc("Don't use colors when showing diagnostics "
"(automatically turned off if output is not a "
"terminal)."));
OpenPOWER on IntegriCloud