Add -Wmismatched-return-types flag for existing warning on conflicting return types.

llvm-svn: 167518
This commit is contained in:
Ted Kremenek 2012-11-07 01:43:44 +00:00
parent 8a7e80f6f5
commit 514fc6fa0f
3 changed files with 4 additions and 3 deletions

View File

@ -141,6 +141,7 @@ def : DiagGroup<"nested-externs">;
def CXX11LongLong : DiagGroup<"c++11-long-long">;
def LongLong : DiagGroup<"long-long", [CXX11LongLong]>;
def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">;
def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">;
def MismatchedTags : DiagGroup<"mismatched-tags">;
def MissingFieldInitializers : DiagGroup<"missing-field-initializers">;
def ModuleBuild : DiagGroup<"module-build">;

View File

@ -512,7 +512,8 @@ def warn_conflicting_overriding_ret_types : Warning<
def warn_conflicting_ret_types : Warning<
"conflicting return type in "
"implementation of %0%diff{: $ vs $|}1,2">;
"implementation of %0%diff{: $ vs $|}1,2">,
InGroup<MismatchedReturnTypes>;
def warn_conflicting_overriding_ret_type_modifiers : Warning<
"conflicting distributed object modifiers on return type "

View File

@ -18,7 +18,7 @@ This test serves two purposes:
The list of warnings below should NEVER grow. It should gradually shrink to 0.
CHECK: Warnings without flags (149):
CHECK: Warnings without flags (148):
CHECK-NEXT: ext_delete_void_ptr_operand
CHECK-NEXT: ext_enum_friend
CHECK-NEXT: ext_expected_semi_decl_list
@ -58,7 +58,6 @@ CHECK-NEXT: warn_call_wrong_number_of_arguments
CHECK-NEXT: warn_case_empty_range
CHECK-NEXT: warn_char_constant_too_large
CHECK-NEXT: warn_collection_expr_type
CHECK-NEXT: warn_conflicting_ret_types
CHECK-NEXT: warn_conflicting_variadic
CHECK-NEXT: warn_conv_to_base_not_used
CHECK-NEXT: warn_conv_to_self_not_used