diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-19 07:57:08 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-19 07:57:08 +0000 |
commit | 05494a78c3746a360e81fc1d1797ce52df415b54 (patch) | |
tree | 3e1235b9ac58340395716924d592b6258a6bb3ab /lib/Driver/Driver.cpp | |
parent | 7587719c40ebf02bf11e5e66c30bd20e98edebc2 (diff) |
Driver: Claim unused input arguments when emitting "input file unused"
diagnostic (to suppress more generic unused warning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 8a7f2463eb..f5daf3e16b 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -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) |