diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-08 00:36:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-08 00:36:37 +0000 |
commit | 870158eebf1937c20cc3b311b830566201377f1e (patch) | |
tree | ff02a9fb0156ed800d551ad65b13d5bc5cd1d334 /clang/test/Sema/block-return.c | |
parent | f2ab40a46f924b6bd178c3bc658c44a2f8ed209d (diff) | |
download | bcm5719-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.c | 2 |
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); |