File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -5365,11 +5365,11 @@ void Driver::BuildJobs(Compilation &C) const {
5365
5365
});
5366
5366
}
5367
5367
5368
- // If the user passed -Qunused-arguments or there were errors, don't warn
5369
- // about any unused arguments.
5370
- if (Diags. hasErrorOccurred () ||
5371
- C. getArgs (). hasArg (options::OPT_Qunused_arguments))
5372
- return ;
5368
+ // If the user passed -Qunused-arguments or there were errors, don't
5369
+ // warn about any unused arguments.
5370
+ bool ReportUnusedArguments =
5371
+ !Diags. hasErrorOccurred () &&
5372
+ !C. getArgs (). hasArg (options::OPT_Qunused_arguments) ;
5373
5373
5374
5374
// Claim -fdriver-only here.
5375
5375
(void )C.getArgs ().hasArg (options::OPT_fdriver_only);
@@ -5423,7 +5423,7 @@ void Driver::BuildJobs(Compilation &C) const {
5423
5423
!C.getActions ().empty ()) {
5424
5424
Diag (diag::err_drv_unsupported_opt_for_target)
5425
5425
<< A->getSpelling () << getTargetTriple ();
5426
- } else {
5426
+ } else if (ReportUnusedArguments) {
5427
5427
Diag (clang::diag::warn_drv_unused_argument)
5428
5428
<< A->getAsString (C.getArgs ());
5429
5429
}
Original file line number Diff line number Diff line change 27
27
// RUN: not %clang --target=x86_64 -### -mhtm -lc %s 2>&1 \
28
28
// RUN: | FileCheck %s -check-prefix=UNSUP_OPT
29
29
// UNSUP_OPT: error: unsupported option
30
+
31
+
32
+ // RUN: not %clang -c -Qunused-arguments --target=aarch64-- -mfpu=crypto-neon-fp-armv8 %s 2>&1 \
33
+ // RUN: | FileCheck %s --check-prefix=QUNUSED_ARGUMENTS
34
+ // QUNUSED_ARGUMENTS: error: unsupported option '-mfpu=' for target 'aarch64--'
You can’t perform that action at this time.
0 commit comments