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 @@ -5362,11 +5362,11 @@ void Driver::BuildJobs(Compilation &C) const {
5362
5362
});
5363
5363
}
5364
5364
5365
- // If the user passed -Qunused-arguments or there were errors, don't warn
5366
- // about any unused arguments.
5367
- if (Diags. hasErrorOccurred () ||
5368
- C. getArgs (). hasArg (options::OPT_Qunused_arguments))
5369
- return ;
5365
+ // If the user passed -Qunused-arguments or there were errors, don't
5366
+ // warn about any unused arguments.
5367
+ bool ReportUnusedArguments =
5368
+ !Diags. hasErrorOccurred () &&
5369
+ !C. getArgs (). hasArg (options::OPT_Qunused_arguments) ;
5370
5370
5371
5371
// Claim -fdriver-only here.
5372
5372
(void )C.getArgs ().hasArg (options::OPT_fdriver_only);
@@ -5420,7 +5420,7 @@ void Driver::BuildJobs(Compilation &C) const {
5420
5420
!C.getActions ().empty ()) {
5421
5421
Diag (diag::err_drv_unsupported_opt_for_target)
5422
5422
<< A->getSpelling () << getTargetTriple ();
5423
- } else {
5423
+ } else if (ReportUnusedArguments) {
5424
5424
Diag (clang::diag::warn_drv_unused_argument)
5425
5425
<< A->getAsString (C.getArgs ());
5426
5426
}
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