From af7534f08496c118a8575a7adbbd5715a624e4a0 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 3 Sep 2010 00:25:02 +0000 Subject: Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning. The rationale behind this is that it is normal for callback functions to have a non-void return type and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this). llvm-svn: 112918 --- clang/test/Sema/block-return.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/test/Sema/block-return.c') diff --git a/clang/test/Sema/block-return.c b/clang/test/Sema/block-return.c index d40cef18d21..5a4ec010d3a 100644 --- a/clang/test/Sema/block-return.c +++ b/clang/test/Sema/block-return.c @@ -100,10 +100,10 @@ int (*funcptr3[5])(long); int sz8 = sizeof(^int (*[5])(long) {return funcptr3;}); // expected-error {{block declared as returning an array}} void foo6() { - int (^b)(int) __attribute__((noreturn)); // expected-warning{{blocks declared 'noreturn' should have a 'void' result type}} + int (^b)(int) __attribute__((noreturn)); b = ^ (int i) __attribute__((noreturn)) { return 1; }; // expected-error {{block declared 'noreturn' should not return}} b(1); - int (^c)(void) __attribute__((noreturn)) = ^ __attribute__((noreturn)) { return 100; }; // expected-error {{block declared 'noreturn' should not return}} expected-warning{{blocks declared 'noreturn' should have a 'void' result type}} + int (^c)(void) __attribute__((noreturn)) = ^ __attribute__((noreturn)) { return 100; }; // expected-error {{block declared 'noreturn' should not return}} } -- cgit v1.2.3