From: Rafael Espindola Date: Wed, 25 Sep 2013 19:07:08 +0000 (+0000) Subject: Produce an error for unknown -f options. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49b3533e1ac091894537d1a7be4bc51fef1ae1e5;p=clang Produce an error for unknown -f options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191394 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index ebda0fb08c..d03ec94d13 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -822,7 +822,6 @@ def fdata_sections : Flag <["-"], "fdata-sections">, Group, Flags<[CC1O HelpText<"Place each data in its own section (ELF Only)">; def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group, Flags<[CC1Option]>, HelpText<"Place debug types in their own section (ELF Only)">; -def f : Joined<["-"], "f">, Group; def g_Flag : Flag<["-"], "g">, Group, HelpText<"Generate source level debug information">, Flags<[CC1Option]>; def gline_tables_only : Flag<["-"], "gline-tables-only">, Group, diff --git a/test/Driver/no-objc-default-synthesize-properties.m b/test/Driver/no-objc-default-synthesize-properties.m index e3805140fa..a034926a9e 100644 --- a/test/Driver/no-objc-default-synthesize-properties.m +++ b/test/Driver/no-objc-default-synthesize-properties.m @@ -1,4 +1,4 @@ -// RUN: %clang -fsyntax-only -fno-objc-default-synthesize-properties -fobjc-default-synthesize-properties %s 2>&1 | FileCheck %s +// RUN: not %clang -fsyntax-only -fno-objc-default-synthesize-properties -fobjc-default-synthesize-properties %s 2>&1 | FileCheck %s @interface I @property int P; @@ -6,5 +6,5 @@ @implementation I @end -// CHECK: warning: argument unused during compilation: '-fno-objc-default-synthesize-properties' -// CHECK: warning: argument unused during compilation: '-fobjc-default-synthesize-properties' +// CHECK: error: unknown argument: '-fno-objc-default-synthesize-properties' +// CHECK: error: unknown argument: '-fobjc-default-synthesize-properties' diff --git a/test/Driver/unknown-arg.c b/test/Driver/unknown-arg.c index 03ccc46b2e..f834a0e8db 100644 --- a/test/Driver/unknown-arg.c +++ b/test/Driver/unknown-arg.c @@ -1,4 +1,4 @@ -// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats 2>&1 | \ +// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option 2>&1 | \ // RUN: FileCheck %s // CHECK: unknown argument: '-cake-is-lie' @@ -7,9 +7,9 @@ // CHECK: unknown argument: '-HHHH' // CHECK: unknown argument: '-munknown-to-clang-option' // CHECK: unknown argument: '-print-stats' +// CHECK: unknown argument: '-funknown-to-clang-option' -// RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s +// RUN: %clang -S %s -o %t.s -Wunknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s -// IGNORED: warning: argument unused during compilation: '-funknown-to-clang-option' // IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'