]> granicus.if.org Git - clang/commitdiff
Driver: Claim unused input arguments when emitting "input file unused"
authorDaniel Dunbar <daniel@zuster.org>
Thu, 19 Mar 2009 07:57:08 +0000 (07:57 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 19 Mar 2009 07:57:08 +0000 (07:57 +0000)
diagnostic (to suppress more generic unused warning).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67294 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Driver.cpp

index 8a7f2463eb4f7fe9a4ecb7e19a6e0d185878d528..f5daf3e16bb0a5526bcdaa0eb0b36639ac1f9e36 100644 (file)
@@ -530,6 +530,8 @@ void Driver::BuildActions(const ArgList &Args, ActionList &Actions) const {
     // 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)