зеркало из https://github.com/microsoft/clang-1.git
Provide a -no-pedantic to cancel out -pedantic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158416 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
1156afd1df
Коммит
dc9327a8da
|
@ -831,6 +831,7 @@ def no_canonical_prefixes : Flag<"-no-canonical-prefixes">, Flags<[HelpHidden]>,
|
|||
def no_cpp_precomp : Flag<"-no-cpp-precomp">, Group<clang_ignored_f_Group>;
|
||||
def no_integrated_as : Flag<"-no-integrated-as">, Flags<[DriverOption]>;
|
||||
def no_integrated_cpp : Flag<"-no-integrated-cpp">, Flags<[DriverOption]>;
|
||||
def no_pedantic : Flag<"-no-pedantic">, Group<pedantic_Group>;
|
||||
def no__dead__strip__inits__and__terms : Flag<"-no_dead_strip_inits_and_terms">;
|
||||
def nobuiltininc : Flag<"-nobuiltininc">, Flags<[CC1Option]>,
|
||||
HelpText<"Disable builtin #include directories">;
|
||||
|
@ -1033,6 +1034,7 @@ def _machine_EQ : Joined<"--machine=">, Alias<m_Joined>;
|
|||
def _machine : Separate<"--machine">, Alias<m_Joined>;
|
||||
def _no_integrated_cpp : Flag<"--no-integrated-cpp">, Alias<no_integrated_cpp>;
|
||||
def _no_line_commands : Flag<"--no-line-commands">, Alias<P>;
|
||||
def _no_pedantic : Flag<"--no-pedantic">, Alias<no_pedantic>;
|
||||
def _no_standard_includes : Flag<"--no-standard-includes">, Alias<nostdinc>;
|
||||
def _no_standard_libraries : Flag<"--no-standard-libraries">, Alias<nostdlib>;
|
||||
def _no_undefined : Flag<"--no-undefined">, Flags<[LinkerInput]>;
|
||||
|
|
|
@ -2034,7 +2034,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
}
|
||||
|
||||
Args.AddAllArgs(CmdArgs, options::OPT_W_Group);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_pedantic);
|
||||
if (Args.hasFlag(options::OPT_pedantic, options::OPT_no_pedantic, false))
|
||||
CmdArgs.push_back("-pedantic");
|
||||
Args.AddLastArg(CmdArgs, options::OPT_pedantic_errors);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_w);
|
||||
|
||||
|
|
|
@ -8,3 +8,8 @@
|
|||
// CHECK: unknown warning option '-Wmonkey'
|
||||
// CHECK: unknown warning option '-Wno-monkey'
|
||||
// CHECK: unknown warning option '-Wno-unused-command-line-arguments'; did you mean '-Wno-unused-command-line-argument'?
|
||||
|
||||
// RUN: %clang -### -pedantic -no-pedantic %s 2>&1 | FileCheck -check-prefix=NO_PEDANTIC %s
|
||||
// NO_PEDANTIC-NOT: -pedantic
|
||||
// RUN: %clang -### -pedantic -pedantic -no-pedantic -pedantic %s 2>&1 | FileCheck -check-prefix=PEDANTIC %s
|
||||
// PEDANTIC: -pedantic
|
||||
|
|
Загрузка…
Ссылка в новой задаче