PR 20146
authorNathan Sidwell <nathan@acm.org>
Wed, 28 Jan 2015 14:48:39 +0000 (14:48 +0000)
committerNathan Sidwell <nathan@acm.org>
Wed, 28 Jan 2015 14:48:39 +0000 (14:48 +0000)
make new diagnostic an ExtWarn

llvm-svn: 227312

clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/test/Sema/function.c

index 19e6861..cbc254e 100644 (file)
@@ -1,3 +1,4 @@
+
 //==--- DiagnosticSemaKinds.td - libsema diagnostics ----------------------===//
 //
 //                     The LLVM Compiler Infrastructure
@@ -4329,8 +4330,9 @@ def note_exits_block_captures_strong : Note<
 def note_exits_block_captures_weak : Note<
   "jump exits lifetime of block which weakly captures a variable">;
 
-def err_func_returning_qualified_void : Error<
-  "function cannot return qualified void type %0">;
+def err_func_returning_qualified_void : ExtWarn<
+  "function cannot return qualified void type %0">,
+  InGroup<DiagGroup<"qualified-void-return-type">>;
 def err_func_returning_array_function : Error<
   "function cannot return %select{array|function}0 type %1">;
 def err_field_declared_as_function : Error<"field %0 declared as a function">;
index 4404b52..26be614 100644 (file)
@@ -116,6 +116,6 @@ void t22(int *ptr, int (*array)[3]) {
 
 void const Bar (void); // ok on decl
 // PR 20146
-void const Bar (void) // expected-error {{function cannot return qualified void type 'const void'}}
+void const Bar (void) // expected-warning {{function cannot return qualified void type 'const void'}}
 {
 }