diff options
Diffstat (limited to 'clang/test/Sema/block-return.c')
-rw-r--r-- | clang/test/Sema/block-return.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Sema/block-return.c b/clang/test/Sema/block-return.c index 4a32a97a5de..e1a3cfd8123 100644 --- a/clang/test/Sema/block-return.c +++ b/clang/test/Sema/block-return.c @@ -97,7 +97,8 @@ int (*funcptr3[5])(long); int sz8 = sizeof(^int (*[5])(long) {return funcptr3;}); // expected-error {{block declared as returning an array}} void foo6() { - void (^b)(int) __attribute__((noreturn)); + 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}} } |