r227312 - PR 20146
Nathan Sidwell
nathan at acm.org
Wed Jan 28 06:48:39 PST 2015
Author: nathan
Date: Wed Jan 28 08:48:39 2015
New Revision: 227312
URL: http://llvm.org/viewvc/llvm-project?rev=227312&view=rev
Log:
PR 20146
make new diagnostic an ExtWarn
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/Sema/function.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=227312&r1=227311&r2=227312&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Jan 28 08:48:39 2015
@@ -1,3 +1,4 @@
+
//==--- DiagnosticSemaKinds.td - libsema diagnostics ----------------------===//
//
// The LLVM Compiler Infrastructure
@@ -4329,8 +4330,9 @@ def note_exits_block_captures_strong : N
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">;
Modified: cfe/trunk/test/Sema/function.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/function.c?rev=227312&r1=227311&r2=227312&view=diff
==============================================================================
--- cfe/trunk/test/Sema/function.c (original)
+++ cfe/trunk/test/Sema/function.c Wed Jan 28 08:48:39 2015
@@ -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'}}
{
}
More information about the cfe-commits
mailing list