From c6d8efd0415cd926affdeec6e48a212a68d34d25 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 7 Nov 2012 01:25:56 +0000 Subject: [PATCH] Add -Wmismatched-parameter-types flag for existing warning on conflicting parameter types. llvm-svn: 167515 --- clang/include/clang/Basic/DiagnosticGroups.td | 1 + clang/include/clang/Basic/DiagnosticSemaKinds.td | 4 +++- clang/test/Misc/warning-flags.c | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td index 33c92a5..1d66dcc 100644 --- a/clang/include/clang/Basic/DiagnosticGroups.td +++ b/clang/include/clang/Basic/DiagnosticGroups.td @@ -140,6 +140,7 @@ def MultiChar : DiagGroup<"multichar">; def : DiagGroup<"nested-externs">; def CXX11LongLong : DiagGroup<"c++11-long-long">; def LongLong : DiagGroup<"long-long", [CXX11LongLong]>; +def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">; def MismatchedTags : DiagGroup<"mismatched-tags">; def MissingFieldInitializers : DiagGroup<"missing-field-initializers">; def ModuleBuild : DiagGroup<"module-build">; diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 80ac5ad..40962e4 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -541,7 +541,9 @@ def warn_conflicting_overriding_param_types : Warning< def warn_conflicting_param_types : Warning< "conflicting parameter types in " - "implementation of %0%diff{: $ vs $|}1,2">; + "implementation of %0%diff{: $ vs $|}1,2">, + InGroup; + def warn_conflicting_param_modifiers : Warning< "conflicting distributed object modifiers on parameter type " "in implementation of %0">, diff --git a/clang/test/Misc/warning-flags.c b/clang/test/Misc/warning-flags.c index 32369df..0e1bd79 100644 --- a/clang/test/Misc/warning-flags.c +++ b/clang/test/Misc/warning-flags.c @@ -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 (150): +CHECK: Warnings without flags (149): 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_param_types CHECK-NEXT: warn_conflicting_ret_types CHECK-NEXT: warn_conflicting_variadic CHECK-NEXT: warn_conv_to_base_not_used -- 2.7.4