Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeffrey Yasskin 2010-06-08 04:56:20 +00:00
Родитель a71d3c6537
Коммит 0ea22fdfda
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -244,6 +244,7 @@ def fbootclasspath_EQ : Joined<"-fbootclasspath=">, Group<f_Group>;
def fbuiltin_strcat : Flag<"-fbuiltin-strcat">, Group<f_Group>;
def fbuiltin_strcpy : Flag<"-fbuiltin-strcpy">, Group<f_Group>;
def fbuiltin : Flag<"-fbuiltin">, Group<f_Group>;
def fcaret_diagnostics : Flag<"-fcaret-diagnostics">, Group<f_Group>;
def fcatch_undefined_behavior : Flag<"-fcatch-undefined-behavior">,
Group<f_Group>, HelpText<"Generate runtime checks for undefined behavior.">;
def fclasspath_EQ : Joined<"-fclasspath=">, Group<f_Group>;

Просмотреть файл

@ -1179,7 +1179,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
}
}
Args.AddLastArg(CmdArgs, options::OPT_fno_caret_diagnostics);
Args.AddLastArg(CmdArgs, options::OPT_fno_show_column);
Args.AddLastArg(CmdArgs, options::OPT_fobjc_sender_dependent_dispatch);
Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_print_source_range_info);
@ -1348,6 +1347,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
D.Diag(clang::diag::warn_drv_clang_unsupported)
<< Args.getLastArg(options::OPT_funsigned_bitfields)->getAsString(Args);
// -fcaret-diagnostics is default.
if (!Args.hasFlag(options::OPT_fcaret_diagnostics,
options::OPT_fno_caret_diagnostics, true))
CmdArgs.push_back("-fno-caret-diagnostics");
// -fdiagnostics-fixit-info is default, only pass non-default.
if (!Args.hasFlag(options::OPT_fdiagnostics_fixit_info,
options::OPT_fno_diagnostics_fixit_info))