aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 68ff8bc8b0..f9a82ff78d 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -802,7 +802,8 @@ void Driver::BuildJobs(Compilation &C) const {
// 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))
+ if (Diags.getNumErrors() ||
+ C.getArgs().hasArg(options::OPT_Qunused_arguments))
return;
// Claim -### here.
@@ -816,6 +817,9 @@ void Driver::BuildJobs(Compilation &C) const {
// Diagnostic, so that extra values, position, and so on could be
// printed.
if (!A->isClaimed()) {
+ if (A->getOption().hasNoArgumentUnused())
+ continue;
+
// Suppress the warning automatically if this is just a flag,
// and it is an instance of an argument we already claimed.
const Option &Opt = A->getOption();