From: Chandler Carruth Date: Thu, 5 Sep 2013 10:09:03 +0000 (+0000) Subject: Support suppressing unused arguments warnings as a core option so that X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2c70470def1ab0380be36a295ce4aa7864abfe1;p=clang Support suppressing unused arguments warnings as a core option so that it works in the CL flavor driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190040 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index f204ae1ce9..26a6e216ea 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -219,7 +219,7 @@ def Ofast : Joined<["-"], "Ofast">, Group, Flags<[CC1Option]>; def P : Flag<["-"], "P">, Flags<[CC1Option]>, HelpText<"Disable linemarker output in -E mode">; def Qn : Flag<["-"], "Qn">; -def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[DriverOption]>, +def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[DriverOption, CoreOption]>, HelpText<"Don't emit warning for unused driver arguments">; def Q : Flag<["-"], "Q">; def R : Flag<["-"], "R">; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 899efe481a..5387d2fa57 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -98,6 +98,10 @@ // RUN: %clang_cl /Zs /WX /analyze- /errorReport:foo /nologo /Ob1 /Ob2 -- %s // RUN: %clang_cl /Zs /WX /Zc:forScope /Zc:wchar_t /wd1234 -- %s +// Support ignoring warnings about unused arguments. +// RUN: %clang_cl /Abracadabra -Qunused-arguments -### -- %s 2>&1 | FileCheck -check-prefix=UNUSED %s +// UNUSED-NOT: warning + // Unsupported but parsed options. Check that we don't error on them. // (/Zs is for syntax-only)