r190040 - Support suppressing unused arguments warnings as a core option so that

Chandler Carruth chandlerc at gmail.com
Thu Sep 5 03:09:03 PDT 2013


Author: chandlerc
Date: Thu Sep  5 05:09:03 2013
New Revision: 190040

URL: http://llvm.org/viewvc/llvm-project?rev=190040&view=rev
Log:
Support suppressing unused arguments warnings as a core option so that
it works in the CL flavor driver.

Modified:
    cfe/trunk/include/clang/Driver/Options.td
    cfe/trunk/test/Driver/cl-options.c

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=190040&r1=190039&r2=190040&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Thu Sep  5 05:09:03 2013
@@ -219,7 +219,7 @@ def Ofast : Joined<["-"], "Ofast">, Grou
 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">;

Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=190040&r1=190039&r2=190040&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Thu Sep  5 05:09:03 2013
@@ -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)





More information about the cfe-commits mailing list