summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/block-return.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-08 00:36:37 +0000
committerChris Lattner <sabre@nondot.org>2009-09-08 00:36:37 +0000
commit870158eebf1937c20cc3b311b830566201377f1e (patch)
treeff02a9fb0156ed800d551ad65b13d5bc5cd1d334 /clang/test/Sema/block-return.c
parentf2ab40a46f924b6bd178c3bc658c44a2f8ed209d (diff)
downloadbcm5719-llvm-870158eebf1937c20cc3b311b830566201377f1e.tar.gz
bcm5719-llvm-870158eebf1937c20cc3b311b830566201377f1e.zip
reject returning a block expr even when it has parens and casts in the way.
llvm-svn: 81176
Diffstat (limited to 'clang/test/Sema/block-return.c')
-rw-r--r--clang/test/Sema/block-return.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Sema/block-return.c b/clang/test/Sema/block-return.c
index 87f4040be9d..96dde363de6 100644
--- a/clang/test/Sema/block-return.c
+++ b/clang/test/Sema/block-return.c
@@ -91,6 +91,8 @@ bptr foo5(int j) {
if (j)
return ^{ ^{ i=0; }(); }; // expected-error {{returning block that lives on the local stack}}
return ^{ i=0; }; // expected-error {{returning block that lives on the local stack}}
+ return (^{ i=0; }); // expected-error {{returning block that lives on the local stack}}
+ return (void*)(^{ i=0; }); // expected-error {{returning block that lives on the local stack}}
}
int (*funcptr3[5])(long);
OpenPOWER on IntegriCloud