[cfe-commits] r67294 - /cfe/trunk/lib/Driver/Driver.cpp

Daniel Dunbar daniel at zuster.org
Thu Mar 19 00:57:08 PDT 2009


Author: ddunbar
Date: Thu Mar 19 02:57:08 2009
New Revision: 67294

URL: http://llvm.org/viewvc/llvm-project?rev=67294&view=rev
Log:
Driver: Claim unused input arguments when emitting "input file unused"
diagnostic (to suppress more generic unused warning).

Modified:
    cfe/trunk/lib/Driver/Driver.cpp

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=67294&r1=67293&r2=67294&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Mar 19 02:57:08 2009
@@ -530,6 +530,8 @@
     // part of this compilation, warn the user about it.
     phases::ID InitialPhase = types::getCompilationPhase(InputType, 0);
     if (InitialPhase > FinalPhase) {
+      // Claim here to avoid the more general unused warning.
+      InputArg->claim();
       Diag(clang::diag::warn_drv_input_file_unused) 
         << InputArg->getValue(Args)
         << getPhaseName(InitialPhase)





More information about the cfe-commits mailing list