From: Eli Friedman Date: Mon, 30 Mar 2009 21:19:48 +0000 (+0000) Subject: Implement -Wno-pointer-sign. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=757e0dd411c8b6c9c13a310883457a3372b1795a;p=clang Implement -Wno-pointer-sign. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68062 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def index 1c16b333f7..dc5dd85cec 100644 --- a/include/clang/Driver/Options.def +++ b/include/clang/Driver/Options.def @@ -283,6 +283,7 @@ OPTION("-Wno-format-y2k", Wno_format_y2k, Flag, clang_ignored_W_Group, INVALID, OPTION("-Wno-four-char-constants", Wno_four_char_constants, Flag, clang_ignored_W_Group, INVALID, "", 0) OPTION("-Wno-missing-field-initializers", Wno_missing_field_initializers, Flag, clang_ignored_W_Group, INVALID, "", 0) OPTION("-Wno-nonportable-cfstrings", Wno_nonportable_cfstrings, Joined, W_Group, INVALID, "", 0) +OPTION("-Wno-pointer-sign", Wno_pointer_sign, Flag, clang_W_Group, INVALID, "", 0) OPTION("-Wno-strict-selector-match", Wno_strict_selector_match, Flag, clang_W_Group, INVALID, "", 0) OPTION("-Wno-trigraphs", Wno_trigraphs, Flag, clang_ignored_W_Group, INVALID, "", 0) OPTION("-Wno-unknown-pragmas", Wno_unknown_pragmas, Flag, clang_ignored_W_Group, INVALID, "", 0) diff --git a/tools/clang-cc/Warnings.cpp b/tools/clang-cc/Warnings.cpp index 18e44d72e3..54155e45a6 100644 --- a/tools/clang-cc/Warnings.cpp +++ b/tools/clang-cc/Warnings.cpp @@ -136,6 +136,9 @@ static const diag::kind UndefDiags[] = { diag::warn_pp_undef_identifier }; static const diag::kind ImplicitFunctionDeclarationDiags[] = { diag::ext_implicit_function_decl, diag::warn_implicit_function_decl }; +static const diag::kind PointerSignDiags[] = { + diag::ext_typecheck_convert_incompatible_pointer_sign +}; // Hmm ... this option is currently actually completely ignored. //static const diag::kind StrictSelectorMatchDiags[] = { }; // Second the table of options. MUST be sorted by name! Binary lookup is done. @@ -143,6 +146,7 @@ static const WarningOption OptionTable[] = { { "float-equal", DIAGS(FloatEqualDiags) }, { "format-nonliteral", DIAGS(FormatNonLiteralDiags) }, { "implicit-function-declaration", DIAGS(ImplicitFunctionDeclarationDiags) }, + { "pointer-sign", DIAGS(PointerSignDiags) }, { "readonly-setter-attrs", DIAGS(ReadOnlySetterAttrsDiags) }, { "undef", DIAGS(UndefDiags) }, { "unused-macros", DIAGS(UnusedMacrosDiags) },