From: Alp Toker Date: Mon, 14 Jul 2014 18:11:38 +0000 (+0000) Subject: Change the diagnostic group for unsupported gcc optimizations added r212805 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86f6934e27e9506b0b30c8f3fa23a017a0a50784;p=platform%2Fupstream%2Fllvm.git 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. llvm-svn: 212964 --- diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index e67c352..0ef8294 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -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; def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup; def warn_drv_optimization_value : Warning<"optimization level '%0' is unsupported; using '%1%2' instead">, InGroup; +def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">, + InGroup; def warn_c_kext : Warning< "ignoring -fapple-kext which is valid for C++ and Objective-C++ only">; def warn_drv_input_file_unused : Warning< diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c index f31e9e2..9c3db16 100644 --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -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