[cfe-commits] r81971 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/Sema/attr-noreturn.c
Mike Stump
mrs at apple.com
Tue Sep 15 17:39:34 PDT 2009
Author: mrs
Date: Tue Sep 15 19:39:34 2009
New Revision: 81971
URL: http://llvm.org/viewvc/llvm-project?rev=81971&view=rev
Log:
Some people don't want to fix their broken code just yet, so turn off
hard error for falling off a noreturn function.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/Sema/attr-noreturn.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=81971&r1=81970&r2=81971&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Sep 15 19:39:34 2009
@@ -2078,7 +2078,8 @@
"function %0 declared 'noreturn' should not return">, DefaultError,
InGroup<DiagGroup<"invalid-noreturn">>;
def warn_falloff_noreturn_function : Warning<
- "function declared 'noreturn' should not return">, DefaultError,
+ "function declared 'noreturn' should not return">,
+ // FIXME: turn back on in 2010 :-): DefaultError,
InGroup<DiagGroup<"invalid-noreturn">>;
def err_noreturn_block_has_return_expr : Error<
"block declared 'noreturn' should not return">;
Modified: cfe/trunk/test/Sema/attr-noreturn.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-noreturn.c?rev=81971&r1=81970&r2=81971&view=diff
==============================================================================
--- cfe/trunk/test/Sema/attr-noreturn.c (original)
+++ cfe/trunk/test/Sema/attr-noreturn.c Tue Sep 15 19:39:34 2009
@@ -4,7 +4,7 @@
static void __attribute__((noreturn)) f0(void) {
fatal();
-} // expected-error {{function declared 'noreturn' should not return}}
+} // expected-warning {{function declared 'noreturn' should not return}}
// On K&R
int f1() __attribute__((noreturn));
@@ -32,4 +32,4 @@
f5 (unsigned long size)
{
-}
\ No newline at end of file
+}
More information about the cfe-commits
mailing list