r191394 - Produce an error for unknown -f options.
Nick Lewycky
nlewycky at google.com
Wed Sep 25 17:42:14 PDT 2013
On 25 September 2013 12:07, Rafael Espindola <rafael.espindola at gmail.com>wrote:
> Author: rafael
> Date: Wed Sep 25 14:07:08 2013
> New Revision: 191394
>
> URL: http://llvm.org/viewvc/llvm-project?rev=191394&view=rev
> Log:
> Produce an error for unknown -f options.
>
Err, we aren't ready for this. If we're going to do this, could you stage
it such that the gcc flags are added but ignored, then we error on unknown
options? Then we can work on reducing that list of known-but-ignored gcc
flags. But for now, this breaks the world. Please revert.
Nick
> Modified:
> cfe/trunk/include/clang/Driver/Options.td
> cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m
> cfe/trunk/test/Driver/unknown-arg.c
>
> Modified: cfe/trunk/include/clang/Driver/Options.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=191394&r1=191393&r2=191394&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Driver/Options.td (original)
> +++ cfe/trunk/include/clang/Driver/Options.td Wed Sep 25 14:07:08 2013
> @@ -822,7 +822,6 @@ def fdata_sections : Flag <["-"], "fdata
> HelpText<"Place each data in its own section (ELF Only)">;
> def fdebug_types_section: Flag <["-"], "fdebug-types-section">,
> Group<f_Group>,
> Flags<[CC1Option]>, HelpText<"Place debug types in their own section
> (ELF Only)">;
> -def f : Joined<["-"], "f">, Group<f_Group>;
> def g_Flag : Flag<["-"], "g">, Group<g_Group>,
> HelpText<"Generate source level debug information">, Flags<[CC1Option]>;
> def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<g_Group>,
>
> Modified: cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m?rev=191394&r1=191393&r2=191394&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m
> (original)
> +++ cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m Wed Sep
> 25 14:07:08 2013
> @@ -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'
>
> Modified: cfe/trunk/test/Driver/unknown-arg.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/unknown-arg.c?rev=191394&r1=191393&r2=191394&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/unknown-arg.c (original)
> +++ cfe/trunk/test/Driver/unknown-arg.c Wed Sep 25 14:07:08 2013
> @@ -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'
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130925/08367363/attachment.html>
More information about the cfe-commits
mailing list