[cfe-commits] r68410 - in /cfe/trunk: include/clang/Driver/Options.def lib/Driver/Driver.cpp
Daniel Dunbar
daniel at zuster.org
Fri Apr 3 15:09:24 PDT 2009
Author: ddunbar
Date: Fri Apr 3 17:09:23 2009
New Revision: 68410
URL: http://llvm.org/viewvc/llvm-project?rev=68410&view=rev
Log:
Driver: Add -Qunused-arguments option to suppress driver "unused
arguments" warning.
Modified:
cfe/trunk/include/clang/Driver/Options.def
cfe/trunk/lib/Driver/Driver.cpp
Modified: cfe/trunk/include/clang/Driver/Options.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.def?rev=68410&r1=68409&r2=68410&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Fri Apr 3 17:09:23 2009
@@ -268,6 +268,8 @@
OPTION("-O", O, Joined, O_Group, INVALID, "", 0, 0, 0)
OPTION("-P", P, Flag, INVALID, INVALID, "", 0, 0, 0)
OPTION("-Qn", Qn, Flag, INVALID, INVALID, "", 0, 0, 0)
+OPTION("-Qunused-arguments", Qunused_arguments, Flag, INVALID, INVALID, "d", 0,
+ "Don't emit warning for unused driver arguments", 0)
OPTION("-Q", Q, Flag, INVALID, INVALID, "", 0, 0, 0)
OPTION("-R", R, Flag, INVALID, INVALID, "", 0, 0, 0)
OPTION("-S", S, Flag, INVALID, INVALID, "d", 0,
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=68410&r1=68409&r2=68410&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Apr 3 17:09:23 2009
@@ -792,8 +792,9 @@
II);
}
- // If there were errors, don't warn about any unused arguments.
- if (Diags.getNumErrors())
+ // If the user passed -Qunused-arguments or there were errors, don't
+ // warn about any unused arguments.
+ if (Diags.getNumErrors() || C.getArgs().hasArg(options::OPT_Qunused_arguments))
return;
// Claim -### here.
More information about the cfe-commits
mailing list