summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 8a7f2463eb4..f5daf3e16bb 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud