summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/Driver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index a1c80a14795..7890e72de63 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -792,8 +792,9 @@ void Driver::BuildJobs(Compilation &C) const {
II);
}
- // If there were errors, don't warn about any unused arguments.
- if (Diags.getNumErrors())
+ // 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))
return;
// Claim -### here.
OpenPOWER on IntegriCloud