From: Daniel Dunbar Date: Thu, 29 Oct 2009 02:24:45 +0000 (+0000) Subject: PR5328: Allow duplicatic -pedantic (and -pedantic-errors) options. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e8371eb97a08f724be22ae6042d1e9eacbe4c48;p=clang PR5328: Allow duplicatic -pedantic (and -pedantic-errors) options. - clang-cc doesn't care about their relative order with other -W options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85473 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 7bc83e84c6..85f79d807f 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -757,7 +757,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, A->render(Args, CmdArgs); } - Args.AddAllArgs(CmdArgs, options::OPT_W_Group, options::OPT_pedantic_Group); + Args.AddAllArgs(CmdArgs, options::OPT_W_Group); + Args.AddLastArg(CmdArgs, options::OPT_pedantic); + Args.AddLastArg(CmdArgs, options::OPT_pedantic_errors); Args.AddLastArg(CmdArgs, options::OPT_w); // Handle -{std, ansi, trigraphs} -- take the last of -{std, ansi}