On 2011-12-18 21:44, Dimitry Andric wrote:
...
> Therefore, I propose the attached patch, which adds a new warning option
> (-Wknr-promoted-parameter) for turning it on or off.  This runs through
> the standard tests just fine.

That is, if I would have sent the correct patch, which also decrements
the counter in tools/clang/test/Misc/warning-flags.c...  Apologies.
Index: tools/clang/test/Misc/warning-flags.c
===================================================================
--- tools/clang/test/Misc/warning-flags.c	(revision 146850)
+++ tools/clang/test/Misc/warning-flags.c	(working copy)
@@ -17,7 +17,7 @@ This test serves two purposes:
 
 The list of warnings below should NEVER grow.  It should gradually shrink to 0.
 
-CHECK: Warnings without flags (270):
+CHECK: Warnings without flags (269):
 CHECK-NEXT:   ext_anon_param_requires_type_specifier
 CHECK-NEXT:   ext_anonymous_struct_union_qualified
 CHECK-NEXT:   ext_array_init_copy
@@ -56,7 +56,6 @@ CHECK-NEXT:   ext_missing_whitespace_after_macro_n
 CHECK-NEXT:   ext_new_paren_array_nonconst
 CHECK-NEXT:   ext_nonstandard_escape
 CHECK-NEXT:   ext_param_not_declared
-CHECK-NEXT:   ext_param_promoted_not_compatible_with_prototype
 CHECK-NEXT:   ext_paste_comma
 CHECK-NEXT:   ext_plain_complex
 CHECK-NEXT:   ext_pp_bad_vaargs_use
Index: tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
===================================================================
--- tools/clang/include/clang/Basic/DiagnosticSemaKinds.td	(revision 146850)
+++ tools/clang/include/clang/Basic/DiagnosticSemaKinds.td	(working copy)
@@ -1825,7 +1825,8 @@ def note_default_argument_declared_here : Note<
 
 def ext_param_promoted_not_compatible_with_prototype : ExtWarn<
   "promoted type %0 of K&R function parameter is not compatible with the "
-  "parameter type %1 declared in a previous prototype">;
+  "parameter type %1 declared in a previous prototype">,
+  InGroup<KNRPromotedParameter>;
 
 
 // C++ Overloading Semantic Analysis.
Index: tools/clang/include/clang/Basic/DiagnosticGroups.td
===================================================================
--- tools/clang/include/clang/Basic/DiagnosticGroups.td	(revision 146850)
+++ tools/clang/include/clang/Basic/DiagnosticGroups.td	(working copy)
@@ -88,6 +88,7 @@ def LogicalOpParentheses: DiagGroup<"logical-op-pa
 def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
 def : DiagGroup<"import">;
 def IncompatiblePointerTypes : DiagGroup<"incompatible-pointer-types">;
+def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
 def : DiagGroup<"init-self">;
 def : DiagGroup<"inline">;
 def : DiagGroup<"int-to-pointer-cast">;
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to