r212964 - Change the diagnostic group for unsupported gcc optimizations added r212805

Alp Toker alp at nuanti.com
Mon Jul 14 11:11:38 PDT 2014


Author: alp
Date: Mon Jul 14 13:11:38 2014
New Revision: 212964

URL: http://llvm.org/viewvc/llvm-project?rev=212964&view=rev
Log:
Change the diagnostic group for unsupported gcc optimizations added r212805

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.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
    cfe/trunk/test/Driver/clang_f_opts.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=212964&r1=212963&r2=212964&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Mon Jul 14 13:11:38 2014
@@ -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<

Modified: cfe/trunk/test/Driver/clang_f_opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=212964&r1=212963&r2=212964&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang_f_opts.c (original)
+++ cfe/trunk/test/Driver/clang_f_opts.c Mon Jul 14 13:11:38 2014
@@ -172,16 +172,16 @@
 // 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





More information about the cfe-commits mailing list