[cfe-commits] r69261 - in /cfe/trunk: include/clang/Driver/Options.def lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Wed Apr 15 20:44:11 PDT 2009


Author: ddunbar
Date: Wed Apr 15 22:44:10 2009
New Revision: 69261

URL: http://llvm.org/viewvc/llvm-project?rev=69261&view=rev
Log:
Driver: Forward -W* to clang, it can handle all these itself now.

Remove clang_W_Group and clang_ignored_W_Group.

Modified:
    cfe/trunk/include/clang/Driver/Options.def
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/include/clang/Driver/Options.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.def?rev=69261&r1=69260&r2=69261&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Wed Apr 15 22:44:10 2009
@@ -100,7 +100,6 @@
 OPTION("<T group>", T_Group, Group, INVALID, INVALID, "", 0, 0, 0)
 OPTION("<O group>", O_Group, Group, INVALID, INVALID, "", 0, 0, 0)
 OPTION("<W group>", W_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<clang W group>", clang_W_Group, Group, W_Group, INVALID, "", 0, 0, 0)
 OPTION("<X group>", X_Group, Group, INVALID, INVALID, "", 0, 0, 0)
 OPTION("<a group>", a_Group, Group, INVALID, INVALID, "", 0, 0, 0)
 OPTION("<d group>", d_Group, Group, INVALID, INVALID, "", 0, 0, 0)
@@ -115,8 +114,6 @@
 
 // Temporary groups for clang options which we know we don't support,
 // but don't want to verbosely warn the user about.
-OPTION("<clang ignored W group>", clang_ignored_W_Group, Group, W_Group, 
-       INVALID, "", 0, 0, 0)
 OPTION("<clang ignored f group>", clang_ignored_f_Group, Group, f_Group, 
        INVALID, "", 0, 0, 0)
 OPTION("<clang ignored m group>", clang_ignored_m_Group, Group, m_Group, 
@@ -290,82 +287,82 @@
 OPTION("-V", V, JoinedOrSeparate, INVALID, INVALID, "du", 0, 0, 0)
 OPTION("-Wa,", Wa_COMMA, CommaJoined, INVALID, INVALID, "", 0, 
        "Pass the comma separated arguments in <arg> to the assembler", "<arg>")
-OPTION("-Waggregate-return", Waggregate_return, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wall", Wall, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wbad-function-cast", Wbad_function_cast, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wcast-align", Wcast_align, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wcast-qual", Wcast_qual, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wchar-align", Wchar_align, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wchar-subscripts", Wchar_subscripts, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wdeclaration-after-statement", Wdeclaration_after_statement, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wdeprecated-declarations", Wdeprecated_declarations, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Werror-implicit-function-declaration", Werror_implicit_function_declaration, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Werror", Werror, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wextra", Wextra, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wfloat-equal", Wfloat_equal, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wformat-security", Wformat_security, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wformat=2", Wformat_EQ2, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wformat", Wformat, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wfour-char-constants", Wfour_char_constants, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wimplicit-function-declaration", Wimplicit_function_declaration, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Winit-self", Winit_self, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Winline", Winline, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wint-to-pointer-cast", Wint_to_pointer_cast, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Waggregate-return", Waggregate_return, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wall", Wall, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wbad-function-cast", Wbad_function_cast, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wcast-align", Wcast_align, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wcast-qual", Wcast_qual, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wchar-align", Wchar_align, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wchar-subscripts", Wchar_subscripts, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wdeclaration-after-statement", Wdeclaration_after_statement, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wdeprecated-declarations", Wdeprecated_declarations, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Werror-implicit-function-declaration", Werror_implicit_function_declaration, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Werror", Werror, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wextra", Wextra, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wfloat-equal", Wfloat_equal, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wformat-security", Wformat_security, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wformat=2", Wformat_EQ2, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wformat", Wformat, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wfour-char-constants", Wfour_char_constants, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wimplicit-function-declaration", Wimplicit_function_declaration, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Winit-self", Winit_self, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Winline", Winline, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wint-to-pointer-cast", Wint_to_pointer_cast, Flag, W_Group, INVALID, "", 0, 0, 0)
 OPTION("-Wl,", Wl_COMMA, CommaJoined, INVALID, INVALID, "li", 0, 
        "Pass the comma separated arguments in <arg> to the linker", "<arg>")
-OPTION("-Wmissing-braces", Wmissing_braces, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wmissing-declarations", Wmissing_declarations, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wmissing-format-attribute", Wmissing_format_attribute, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wmissing-prototypes", Wmissing_prototypes, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wmost", Wmost, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wnested-externs", Wnested_externs, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wnewline-eof", Wnewline_eof, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-#warnings", Wno__HASHwarnings, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-comment", Wno_comment, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-deprecated-declarations", Wno_deprecated_declarations, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-extra-tokens", Wno_extra_tokens, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-format-nonliteral", Wno_format_nonliteral, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-format-y2k", Wno_format_y2k, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-four-char-constants", Wno_four_char_constants, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-long-long", Wno_long_long, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-missing-field-initializers", Wno_missing_field_initializers, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-missing-prototypes", Wno_missing_prototypes, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wmissing-braces", Wmissing_braces, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wmissing-declarations", Wmissing_declarations, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wmissing-format-attribute", Wmissing_format_attribute, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wmissing-prototypes", Wmissing_prototypes, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wmost", Wmost, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wnested-externs", Wnested_externs, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wnewline-eof", Wnewline_eof, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-#warnings", Wno__HASHwarnings, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-comment", Wno_comment, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-deprecated-declarations", Wno_deprecated_declarations, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-extra-tokens", Wno_extra_tokens, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-format-nonliteral", Wno_format_nonliteral, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-format-y2k", Wno_format_y2k, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-four-char-constants", Wno_four_char_constants, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-long-long", Wno_long_long, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-missing-field-initializers", Wno_missing_field_initializers, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-missing-prototypes", Wno_missing_prototypes, Flag, W_Group, INVALID, "", 0, 0, 0)
 OPTION("-Wno-nonportable-cfstrings", Wno_nonportable_cfstrings, Joined, W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-parentheses", Wno_parentheses, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-pointer-sign", Wno_pointer_sign, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-strict-selector-match", Wno_strict_selector_match, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-trigraphs", Wno_trigraphs, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-unknown-pragmas", Wno_unknown_pragmas, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-unused-parameter", Wno_unused_parameter, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wno-variadic-macros", Wno_variadic_macros, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-parentheses", Wno_parentheses, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-pointer-sign", Wno_pointer_sign, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-strict-selector-match", Wno_strict_selector_match, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-trigraphs", Wno_trigraphs, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-unknown-pragmas", Wno_unknown_pragmas, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-unused-parameter", Wno_unused_parameter, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wno-variadic-macros", Wno_variadic_macros, Flag, W_Group, INVALID, "", 0, 0, 0)
 OPTION("-Wnonportable-cfstrings", Wnonportable_cfstrings, Joined, W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wold-style-definition", Wold_style_definition, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wold-style-definition", Wold_style_definition, Flag, W_Group, INVALID, "", 0, 0, 0)
 OPTION("-Wp,", Wp_COMMA, CommaJoined, INVALID, INVALID, "", 0, 
        "Pass the comma separated arguments in <arg> to the preprocessor", "<arg>")
-OPTION("-Wpacked", Wpacked, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wparentheses", Wparentheses, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wpointer-arith", Wpointer_arith, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wpointer-to-int-cast", Wpointer_to_int_cast, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wreadonly-setter-attrs", Wreadonly_setter_attrs, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wredundant-decls", Wredundant_decls, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wreturn-type", Wreturn_type, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wshadow", Wshadow, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wshorten-64-to-32", Wshorten_64_to_32, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wsign-compare", Wsign_compare, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wstrict-overflow=", Wstrict_overflow_EQ, Joined, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wstrict-overflow", Wstrict_overflow, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wstrict-prototypes", Wstrict_prototypes, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wswitch", Wswitch, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wundef", Wundef, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wuninitialized", Wuninitialized, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wunknown-pragmas", Wunknown_pragmas, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wunused-function", Wunused_function, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wunused-label", Wunused_label, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wunused-macros", Wunused_macros, Flag, clang_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wunused-parameter", Wunused_parameter, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wunused-value", Wunused_value, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wunused-variable", Wunused_variable, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wwrite-strings", Wwrite_strings, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wpacked", Wpacked, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wparentheses", Wparentheses, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wpointer-arith", Wpointer_arith, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wpointer-to-int-cast", Wpointer_to_int_cast, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wreadonly-setter-attrs", Wreadonly_setter_attrs, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wredundant-decls", Wredundant_decls, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wreturn-type", Wreturn_type, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wshadow", Wshadow, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wshorten-64-to-32", Wshorten_64_to_32, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wsign-compare", Wsign_compare, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wstrict-overflow=", Wstrict_overflow_EQ, Joined, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wstrict-overflow", Wstrict_overflow, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wstrict-prototypes", Wstrict_prototypes, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wswitch", Wswitch, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wundef", Wundef, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wuninitialized", Wuninitialized, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wunknown-pragmas", Wunknown_pragmas, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wunused-function", Wunused_function, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wunused-label", Wunused_label, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wunused-macros", Wunused_macros, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wunused-parameter", Wunused_parameter, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wunused-value", Wunused_value, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wunused-variable", Wunused_variable, Flag, W_Group, INVALID, "", 0, 0, 0)
+OPTION("-Wwrite-strings", Wwrite_strings, Flag, W_Group, INVALID, "", 0, 0, 0)
 // -W by itself is an alias for -Wextra
 OPTION("-W", W_Flag, Flag, INVALID, Wextra, "", 0, 0, 0)
 OPTION("-W", W_Joined, Joined, W_Group, INVALID, "", 0, 0, 0)

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=69261&r1=69260&r2=69261&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Apr 15 22:44:10 2009
@@ -392,8 +392,7 @@
       A->render(Args, CmdArgs);
   }
 
-  Args.AddAllArgs(CmdArgs, options::OPT_clang_W_Group,
-                  options::OPT_pedantic_Group);
+  Args.AddAllArgs(CmdArgs, options::OPT_W_Group, options::OPT_pedantic_Group);
   Args.AddLastArg(CmdArgs, options::OPT_w);
 
   // Handle -{std, ansi, trigraphs} -- take the last of -{std, ansi}
@@ -542,8 +541,7 @@
   for (ArgList::const_iterator
          it = Args.begin(), ie = Args.end(); it != ie; ++it) {
     const Arg *A = *it;
-    if (A->getOption().matches(options::OPT_clang_ignored_W_Group) ||
-        A->getOption().matches(options::OPT_clang_ignored_f_Group) ||
+    if (A->getOption().matches(options::OPT_clang_ignored_f_Group) ||
         A->getOption().matches(options::OPT_clang_ignored_m_Group))
       A->claim();
   }





More information about the cfe-commits mailing list