diff options
author | Mike Stump <mrs@apple.com> | 2009-04-29 21:40:37 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-04-29 21:40:37 +0000 |
commit | 56ed2eab9ece1540e6079c1b82a436f57a4d088f (patch) | |
tree | 447759bfd3f32b5b3746594d1850f56977e8b8a2 /clang/test/Sema/block-return.c | |
parent | 53cce5c195e1c1fb5cc0fc42d82374ae14b7f7d9 (diff) | |
download | bcm5719-llvm-56ed2eab9ece1540e6079c1b82a436f57a4d088f.tar.gz bcm5719-llvm-56ed2eab9ece1540e6079c1b82a436f57a4d088f.zip |
Fixup Sema and CodeGen for block literal attributes when the return
type and argument types are missing, and let return type deduction
happen before we give errors for returning from a noreturn block.
Radar 6441502
llvm-svn: 70413
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}} } |