Name the "return-type" DiagGroup and reference it in a few places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70500 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 9fdf874..40d3356 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -63,7 +63,7 @@
 def : DiagGroup<"pointer-arith">;
 def : DiagGroup<"pointer-to-int-cast">;
 def : DiagGroup<"redundant-decls">;
-def : DiagGroup<"return-type">;
+def ReturnType : DiagGroup<"return-type">;
 def : DiagGroup<"sequence-point">;
 def : DiagGroup<"shadow">;
 def : DiagGroup<"shorten-64-to-32">;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 6448e65..24912b8 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1603,11 +1603,14 @@
   "first argument to 'va_arg' is of type %0 and not 'va_list'">;
 
 def warn_return_missing_expr : Warning<
-  "non-void %select{function|method}1 %0 should return a value">;
+  "non-void %select{function|method}1 %0 should return a value">,
+  InGroup<ReturnType>;
 def ext_return_missing_expr : ExtWarn<
-  "non-void %select{function|method}1 %0 should return a value">;
+  "non-void %select{function|method}1 %0 should return a value">,
+  InGroup<ReturnType>;
 def ext_return_has_expr : ExtWarn<
-  "void %select{function|method}1 %0 should not return a value">;
+  "void %select{function|method}1 %0 should not return a value">,
+  InGroup<ReturnType>;
 def ext_return_has_void_expr : Extension<
   "void %select{function|method}1 %0 should not return void expression">;
 def err_noreturn_function_has_return_expr : Error<
diff --git a/test/Sema/return-silent.c b/test/Sema/return-silent.c
new file mode 100644
index 0000000..b3b2a56
--- /dev/null
+++ b/test/Sema/return-silent.c
@@ -0,0 +1,9 @@
+// RUN: clang-cc %s -Wno-return-type -fsyntax-only -verify
+
+int t14() {
+  return;
+}
+
+void t15() {
+  return 1;
+}
diff --git a/test/Sema/return.c b/test/Sema/return.c
index b32b2e9..d96cede 100644
--- a/test/Sema/return.c
+++ b/test/Sema/return.c
@@ -7,3 +7,6 @@
   return; // expected-warning {{non-void function 't14' should return a value}}
 }
 
+void t15() {
+  return 1; // expected-warning {{void function 't15' should not return a value}}
+}