Index: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td =================================================================== --- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td +++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td @@ -124,7 +124,7 @@ def warn_drv_optimization_value : Warning<"optimization level '%0' is not supported; using '%1%2' instead">, InGroup; def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">, - InGroup; + 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< Index: cfe/trunk/include/clang/Basic/DiagnosticGroups.td =================================================================== --- cfe/trunk/include/clang/Basic/DiagnosticGroups.td +++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td @@ -383,7 +383,9 @@ def UnsupportedFriend : DiagGroup<"unsupported-friend">; def UnusedArgument : DiagGroup<"unused-argument">; def UnusedCommandLineArgument : DiagGroup<"unused-command-line-argument">; -def InvalidCommandLineArgument : DiagGroup<"invalid-command-line-argument">; +def IgnoredOptimizationArgument : DiagGroup<"ignored-optimization-argument">; +def InvalidCommandLineArgument : DiagGroup<"invalid-command-line-argument", + [IgnoredOptimizationArgument]>; def UnusedComparison : DiagGroup<"unused-comparison">; def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">; def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">; Index: cfe/trunk/test/Driver/clang_f_opts.c =================================================================== --- cfe/trunk/test/Driver/clang_f_opts.c +++ cfe/trunk/test/Driver/clang_f_opts.c @@ -230,6 +230,9 @@ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s // RUN: %clang -### -finline-limit -Wno-invalid-command-line-argument \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s +// RUN: %clang -### -finline-limit \ +// RUN: -Winvalid-command-line-argument -Wno-ignored-optimization-argument \ +// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s // CHECK-NO-WARNING1-NOT: optimization flag '-finline-limit=1000' is not supported // CHECK-NO-WARNING2-NOT: optimization flag '-finline-limit' is not supported