From 945f7e258404710bad9bd110fceacfb5d6bd5c11 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 3 Oct 2013 19:34:34 +0000 Subject: [PATCH] Fix the test in clang_f_opts.c to fail on unknown options. Also fix options that were broken in the previous refactorings. llvm-svn: 191925 --- clang/include/clang/Driver/CC1Options.td | 2 -- clang/include/clang/Driver/Options.td | 3 +++ clang/test/Driver/clang_f_opts.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index d27ad6a9600d..9acbd48bbc52 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/include/clang/Driver/CC1Options.td @@ -405,8 +405,6 @@ def main_file_name : Separate<["-"], "main-file-name">, HelpText<"Main file name to use for debug info">; def split_dwarf_file : Separate<["-"], "split-dwarf-file">, HelpText<"File name to use for split dwarf debug info output">; -def fno_signed_char : Flag<["-"], "fno-signed-char">, - HelpText<"Char is unsigned">; def fno_wchar : Flag<["-"], "fno-wchar">, HelpText<"Disable C++ builtin type wchar_t">; def fconstant_string_class : Separate<["-"], "fconstant-string-class">, diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 07ce9509cb45..257d195fc8af 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -749,6 +749,8 @@ def fshow_source_location : Flag<["-"], "fshow-source-location">, Group def fspell_checking : Flag<["-"], "fspell-checking">, Group; def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group; def fsigned_char : Flag<["-"], "fsigned-char">, Group; +def fno_signed_char : Flag<["-"], "fno-signed-char">, Flags<[CC1Option]>, + Group, HelpText<"Char is unsigned">; def fsplit_stack : Flag<["-"], "fsplit-stack">, Group; def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group; def fstack_protector : Flag<["-"], "fstack-protector">, Group; @@ -1417,6 +1419,7 @@ defm regs_graph : BooleanFFlag<"regs-graph">, Group; defm ripa : BooleanFFlag<"ripa">, Group; defm rounding_math : BooleanFFlag<"rounding-math">, Group; defm schedule_insns : BooleanFFlag<"schedule-insns">, Group; +defm see : BooleanFFlag<"see">, Group; defm signaling_nans : BooleanFFlag<"signaling-nans">, Group; defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group; defm tls_model : BooleanFFlag<"tls-model">, Group; diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c index c264a75cce7a..57e28f9501d7 100644 --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -126,4 +126,5 @@ // RUN: -fno-var-tracking \ // RUN: -fno-unsigned-char \ // RUN: -fno-signed-char \ -// RUN: %s +// RUN: %s 2>&1 | FileCheck --check-prefix=IGNORE %s +// IGNORE-NOT: error: unknown argument