summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-04-30 00:19:40 +0000
committerMike Stump <mrs@apple.com>2009-04-30 00:19:40 +0000
commite9efa80c003e23d02d8d3bf917d30bef118f236e (patch)
treefcea44b3c158abc2f64b8efeeb6cd1db495dba70 /clang/test/Sema
parent29405d836b29e040740bdaf80c9c7615796a22b1 (diff)
downloadbcm5719-llvm-e9efa80c003e23d02d8d3bf917d30bef118f236e.tar.gz
bcm5719-llvm-e9efa80c003e23d02d8d3bf917d30bef118f236e.zip
Sema checking for incorrect placement of __block. Radar 6441502
llvm-svn: 70452
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/block-misc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/block-misc.c b/clang/test/Sema/block-misc.c
index d4b4088aeeb..397d3e5af6b 100644
--- a/clang/test/Sema/block-misc.c
+++ b/clang/test/Sema/block-misc.c
@@ -146,3 +146,11 @@ void (^test15f)(void);
void test15() {
foo(^{ return LESS; }); // expected-error {{incompatible block pointer types passing 'int (^)(void)', expected 'long (^)()'}}
}
+
+__block int test16i; // expected-error {{__block attribute not allowed, only allowed on local variables}}
+
+void test16(__block int i) { // expected-error {{__block attribute not allowed, only allowed on local variables}}
+ extern __block double extern_var; // expected-error {{__block attribute not allowed, only allowed on local variables}}
+ static __block char * pch; // expected-error {{__block attribute not allowed, only allowed on local variables}}
+}
+
OpenPOWER on IntegriCloud