]> granicus.if.org Git - clang/commitdiff
Change the diagnostic group for unsupported gcc optimizations added r212805
authorAlp Toker <alp@nuanti.com>
Mon, 14 Jul 2014 18:11:38 +0000 (18:11 +0000)
committerAlp Toker <alp@nuanti.com>
Mon, 14 Jul 2014 18:11:38 +0000 (18:11 +0000)
Use -Winvalid-command-line-argument here to align with existing gcc opt
diagnostics. Meanwhile -Wunused-command-line-argument is for flags that we
support but were, say, fed into the wrong invocation.

Also tweak wording to make sense with -Werror.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212964 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticDriverKinds.td
test/Driver/clang_f_opts.c

index e67c3522b0dc45388c296ded9037c8a3b3893c63..0ef82943fa6d57db2e6e884532f82505edb64fcc 100644 (file)
@@ -119,11 +119,11 @@ def err_drv_emit_llvm_link : Error<
 def err_drv_optimization_remark_pattern : Error<
   "%0 in '%1'">;
 
-def warn_ignored_gcc_optimization : Warning<"ignoring unsupported optimization flag '%0'">,
-  InGroup<UnusedCommandLineArgument>;
 def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup<Deprecated>;
 def warn_drv_optimization_value : Warning<"optimization level '%0' is unsupported; using '%1%2' instead">,
   InGroup<InvalidCommandLineArgument>;
+def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">,
+  InGroup<InvalidCommandLineArgument>;
 def warn_c_kext : Warning<
   "ignoring -fapple-kext which is valid for C++ and Objective-C++ only">;
 def warn_drv_input_file_unused : Warning<
index f31e9e225cb62eb42d21b3a48bc3de6b41e673b2..9c3db16660bdfd5072a3af692e549029044d40f2 100644 (file)
 // Test that the warning is displayed on these.
 // RUN: %clang -### -finline-limit=1000 %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING1 %s
 // RUN: %clang -### -finline-limit %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING2 %s
-// CHECK-WARNING1: ignoring unsupported optimization flag '-finline-limit=1000'
-// CHECK-WARNING2: ignoring unsupported optimization flag '-finline-limit'
+// CHECK-WARNING1: optimization flag '-finline-limit=1000' is not supported
+// CHECK-WARNING2: optimization flag '-finline-limit' is not supported
 
 // Test that we mute the warning on these
-// RUN: %clang -### -finline-limit=1000 -Wno-unused-command-line-argument               \
+// RUN: %clang -### -finline-limit=1000 -Wno-invalid-command-line-argument              \
 // RUN:     %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s
-// RUN: %clang -### -finline-limit -Wno-unused-command-line-argument                    \
+// RUN: %clang -### -finline-limit -Wno-invalid-command-line-argument                   \
 // RUN:     %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s
-// CHECK-NO-WARNING1-NOT: ignoring unsupported optimization flag '-finline-limit=1000'
-// CHECK-NO-WARNING2-NOT: ignoring unsupported optimization flag '-finline-limit'
+// CHECK-NO-WARNING1-NOT: optimization flag '-finline-limit=1000' is not supported
+// CHECK-NO-WARNING2-NOT: optimization flag '-finline-limit' is not supported
 
 
 // RUN: %clang -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 %s