From: Nathan Sidwell Date: Wed, 28 Jan 2015 14:48:39 +0000 (+0000) Subject: PR 20146 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43abd4c578de9a0248988fac652f67399f2cccb7;p=clang PR 20146 make new diagnostic an ExtWarn git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227312 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 19e6861685..cbc254e003 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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>; 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">; diff --git a/test/Sema/function.c b/test/Sema/function.c index 4404b52c56..26be61416b 100644 --- a/test/Sema/function.c +++ b/test/Sema/function.c @@ -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'}} { }