aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@freebsd.org>2011-12-20 18:35:44 +0000
committerRoman Divacky <rdivacky@freebsd.org>2011-12-20 18:35:44 +0000
commitd7f02c6c051673ea1004b1830ad84e69ef712919 (patch)
tree38abb07c8728f8ec949636f093408d81cbf129e2
parent2ccd89cff3f1c18b48f649240302446a7dae28b9 (diff)
Let the KNR promotion warning be disabled.
Patch by Dimitry Andric! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146982 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticGroups.td1
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
-rw-r--r--test/Misc/warning-flags.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index bb88d48b38..554961b7b2 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -89,6 +89,7 @@ def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
def : DiagGroup<"import">;
def IncompatiblePointerTypes : DiagGroup<"incompatible-pointer-types">;
def IncompleteUmbrella : DiagGroup<"incomplete-umbrella">;
+def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
def : DiagGroup<"init-self">;
def : DiagGroup<"inline">;
def : DiagGroup<"int-to-pointer-cast">;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 7c2e1f8797..83ba22feff 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -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.
diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c
index dd20fe5b2f..8a3b941eba 100644
--- a/test/Misc/warning-flags.c
+++ b/test/Misc/warning-flags.c
@@ -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_name
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