This doesn't change a lot since clang still thinks it knows all of the
-f*, -m* and -W* options for example.
Other than the options clang explicitly claims to know, this fixes pr9701.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191249
91177308-0d34-0410-b5e6-
96231b3b80d8
}
}
+ for (arg_iterator it = Args->filtered_begin(options::OPT_UNKNOWN),
+ ie = Args->filtered_end(); it != ie; ++it) {
+ Diags.Report(diag::err_drv_unknown_argument) << (*it) ->getAsString(*Args);
+ }
+
return Args;
}
-// RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
-// RUN: FileCheck %s -input-file=%t.log
+// RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d -HHHH 2>&1 | \
+// RUN: FileCheck %s
-// CHECK: unknown argument
-// CHECK: unknown argument
-// CHECK: unknown argument
+// CHECK: unknown argument: '-cake-is-lie'
+// CHECK: unknown argument: '-%0'
+// CHECK: unknown argument: '-%d'
+// CHECK: unknown argument: '-HHHH'
// RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option -munknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s