diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def index de5c0d19c7..b8591815b4 100644 --- a/include/clang/Driver/Options.def +++ b/include/clang/Driver/Options.def @@ -114,6 +114,8 @@ OPTION("", clang_ignored_W_Group, Group, W_Group, INVALID, "", 0, 0, 0) OPTION("", clang_ignored_f_Group, Group, f_Group, INVALID, "", 0, 0, 0) +OPTION("", clang_ignored_m_Group, Group, m_Group, + INVALID, "", 0, 0, 0) ////////// // Options @@ -149,7 +151,7 @@ OPTION("--encoding", _encoding, Separate, INVALID, fencoding_EQ, "J", 0, 0, 0) OPTION("--entry", _entry, Flag, INVALID, e, "", 0, 0, 0) OPTION("--extdirs=", _extdirs_EQ, Joined, INVALID, fextdirs_EQ, "", 0, 0, 0) OPTION("--extdirs", _extdirs, Separate, INVALID, fextdirs_EQ, "J", 0, 0, 0) -OPTION("--extra-warnings", _extra_warnings, Flag, INVALID, W, "", 0, 0, 0) +OPTION("--extra-warnings", _extra_warnings, Flag, INVALID, W_Joined, "", 0, 0, 0) OPTION("--for-linker=", _for_linker_EQ, Joined, INVALID, Xlinker, "liS", 0, 0, 0) OPTION("--for-linker", _for_linker, Separate, INVALID, Xlinker, "li", 0, 0, 0) OPTION("--force-link=", _force_link_EQ, Joined, INVALID, u, "S", 0, 0, 0) @@ -233,8 +235,8 @@ OPTION("--undefine-macro", _undefine_macro, Separate, INVALID, U, "J", 0, 0, 0) OPTION("--user-dependencies", _user_dependencies, Flag, INVALID, MM, "", 0, 0, 0) OPTION("--verbose", _verbose, Flag, INVALID, v, "", 0, 0, 0) OPTION("--version", _version, Flag, INVALID, INVALID, "", 0, 0, 0) -OPTION("--warn-=", _warn__EQ, Joined, INVALID, W, "u", 0, 0, 0) -OPTION("--warn-", _warn_, Joined, INVALID, W, "u", 0, 0, 0) +OPTION("--warn-=", _warn__EQ, Joined, INVALID, W_Joined, "u", 0, 0, 0) +OPTION("--warn-", _warn_, Joined, INVALID, W_Joined, "u", 0, 0, 0) OPTION("--write-dependencies", _write_dependencies, Flag, INVALID, MD, "", 0, 0, 0) OPTION("--write-user-dependencies", _write_user_dependencies, Flag, INVALID, MMD, "", 0, 0, 0) OPTION("--", _, Joined, INVALID, f, "u", 0, 0, 0) @@ -289,28 +291,36 @@ OPTION("-Wcast-align", Wcast_align, Flag, clang_ignored_W_Group, INVALID, "", 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("-Wl,", Wl_COMMA, CommaJoined, INVALID, INVALID, "li", 0, "Pass the comma separated arguments in to the linker", "") 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-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("-Wno-nonportable-cfstrings", Wno_nonportable_cfstrings, Joined, W_Group, INVALID, "", 0, 0, 0) @@ -320,7 +330,9 @@ OPTION("-Wno-strict-selector-match", Wno_strict_selector_match, Flag, clang_W_Gr OPTION("-Wno-trigraphs", Wno_trigraphs, Flag, clang_ignored_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("-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("-Wp,", Wp_COMMA, CommaJoined, INVALID, INVALID, "", 0, "Pass the comma separated arguments in to the preprocessor", "") OPTION("-Wpacked", Wpacked, Flag, clang_ignored_W_Group, INVALID, "", 0, 0, 0) @@ -335,6 +347,7 @@ OPTION("-Wshorten-64-to-32", Wshorten_64_to_32, Flag, clang_ignored_W_Group, INV 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) @@ -342,10 +355,13 @@ OPTION("-Wunknown-pragmas", Wunknown_pragmas, Flag, clang_ignored_W_Group, INVAL 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("-W", W, Joined, 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) OPTION("-Xanalyzer", Xanalyzer, Separate, INVALID, INVALID, "", 0, "Pass to the static analyzer", "") OPTION("-Xarch_", Xarch__, JoinedAndSeparate, INVALID, INVALID, "d", 0, 0, 0) @@ -409,10 +425,11 @@ OPTION("-fbuiltin", fbuiltin, Flag, clang_f_Group, INVALID, "", 0, 0, 0) OPTION("-fclasspath=", fclasspath_EQ, Joined, f_Group, INVALID, "", 0, 0, 0) OPTION("-fcommon", fcommon, Flag, clang_f_Group, INVALID, "", 0, 0, 0) OPTION("-fcompile-resource=", fcompile_resource_EQ, Joined, f_Group, INVALID, "", 0, 0, 0) -OPTION("-fconstant-cfstrings", fconstant_cfstrings, Flag, f_Group, INVALID, "", 0, 0, 0) +OPTION("-fconstant-cfstrings", fconstant_cfstrings, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-fcreate-profile", fcreate_profile, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fdebug-pass-arguments", fdebug_pass_arguments, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fdebug-pass-structure", fdebug_pass_structure, Flag, f_Group, INVALID, "", 0, 0, 0) +OPTION("-fdollars-in-identifiers", fdollars_in_identifiers, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-feliminate-unused-debug-symbols", feliminate_unused_debug_symbols, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-femit-all-decls", femit_all_decls, Flag, clang_f_Group, INVALID, "", 0, 0, 0) OPTION("-fencoding=", fencoding_EQ, Joined, f_Group, INVALID, "", 0, 0, 0) @@ -423,6 +440,9 @@ OPTION("-fgnu-runtime", fgnu_runtime, Flag, clang_f_Group, INVALID, "", 0, 0, 0) OPTION("-fheinous-gnu-extensions", fheinous_gnu_extensions, Flag, INVALID, INVALID, "", 0, 0, 0) OPTION("-filelist", filelist, Separate, INVALID, INVALID, "l", 0, 0, 0) OPTION("-findirect-virtual-calls", findirect_virtual_calls, Flag, f_Group, INVALID, "", 0, 0, 0) +OPTION("-finline-functions", finline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) +OPTION("-finline", finline, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) +OPTION("-fkeep-inline-functions", fkeep_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-flat_namespace", flat__namespace, Flag, INVALID, INVALID, "", 0, 0, 0) OPTION("-flax-vector-conversions", flax_vector_conversions, Flag, clang_f_Group, INVALID, "", 0, 0, 0) OPTION("-flimited-precision=", flimited_precision_EQ, Joined, f_Group, INVALID, "", 0, 0, 0) @@ -440,14 +460,22 @@ OPTION("-fno-caret-diagnostics", fno_caret_diagnostics, Flag, clang_f_Group, INV OPTION("-fno-common", fno_common, Flag, clang_f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-constant-cfstrings", fno_constant_cfstrings, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-eliminate-unused-debug-symbols", fno_eliminate_unused_debug_symbols, Flag, f_Group, INVALID, "", 0, 0, 0) +OPTION("-fno-inline-functions", fno_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) +OPTION("-fno-inline", fno_inline, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) +OPTION("-fno-keep-inline-functions", fno_keep_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-math-errno", fno_math_errno, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-pascal-strings", fno_pascal_strings, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-show-column", fno_show_column, Flag, clang_f_Group, INVALID, "", 0, 0, 0) +OPTION("-fno-stack-protector", fno_stack_protector, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) +OPTION("-fno-strict-aliasing", fno_strict_aliasing, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-unwind-tables", fno_unwind_tables, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-working-directory", fno_working_directory, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-zero-initialized-in-bss", fno_zero_initialized_in_bss, Flag, f_Group, INVALID, "", 0, 0, 0) +OPTION("-fobjc-atdefs", fobjc_atdefs, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) +OPTION("-fobjc-call-cxx-cdtors", fobjc_call_cxx_cdtors, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-fobjc-gc-only", fobjc_gc_only, Flag, clang_f_Group, INVALID, "", 0, 0, 0) OPTION("-fobjc-gc", fobjc_gc, Flag, clang_f_Group, INVALID, "", 0, 0, 0) +OPTION("-fobjc-new-property", fobjc_new_property, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-fobjc-nonfragile-abi", fobjc_nonfragile_abi, Flag, clang_f_Group, INVALID, "", 0, 0, 0) OPTION("-fobjc", fobjc, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fomit-frame-pointer", fomit_frame_pointer, Flag, f_Group, INVALID, "", 0, 0, 0) @@ -463,6 +491,8 @@ OPTION("-fprint-source-range-info", fprint_source_range_info, Flag, clang_f_Grou OPTION("-fprofile-arcs", fprofile_arcs, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fprofile-generate", fprofile_generate, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-framework", framework, Separate, INVALID, INVALID, "l", 0, 0, 0) +OPTION("-fstack-protector", fstack_protector, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) +OPTION("-fstrict-aliasing", fstrict_aliasing, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-fsyntax-only", fsyntax_only, Flag, INVALID, INVALID, "d", 0, 0, 0) OPTION("-ftemplate-depth-", ftemplate_depth_, Joined, f_Group, INVALID, "", 0, 0, 0) OPTION("-fterminated-vtables", fterminated_vtables, Flag, f_Group, INVALID, "", 0, 0, 0) @@ -503,8 +533,9 @@ OPTION("-m32", m32, Flag, m_Group, INVALID, "", 0, 0, 0) OPTION("-m3dnowa", m3dnowa, Flag, m_Group, INVALID, "", 0, 0, 0) OPTION("-m3dnow", m3dnow, Flag, m_Group, INVALID, "", 0, 0, 0) OPTION("-m64", m64, Flag, m_Group, INVALID, "", 0, 0, 0) -OPTION("-mconstant-cfstrings", mconstant_cfstrings, Flag, m_Group, INVALID, "", 0, 0, 0) +OPTION("-mconstant-cfstrings", mconstant_cfstrings, Flag, clang_ignored_m_Group, INVALID, "", 0, 0, 0) OPTION("-mdynamic-no-pic", mdynamic_no_pic, Joined, m_Group, INVALID, "", 0, 0, 0) +OPTION("-mfix-and-continue", mfix_and_continue, Flag, clang_ignored_m_Group, INVALID, "", 0, 0, 0) OPTION("-miphoneos-version-min=", miphoneos_version_min_EQ, Joined, m_Group, INVALID, "", 0, 0, 0) OPTION("-mkernel", mkernel, Flag, m_Group, INVALID, "", 0, 0, 0) OPTION("-mmacosx-version-min=", mmacosx_version_min_EQ, Joined, m_Group, INVALID, "", 0, 0, 0) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index bbf7c9e1a6..62a63cb882 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -431,7 +431,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, 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)) + A->getOption().matches(options::OPT_clang_ignored_f_Group) || + A->getOption().matches(options::OPT_clang_ignored_m_Group)) A->claim(); } }