diff options
Diffstat (limited to 'clang/test/Sema/block-misc.c')
| -rw-r--r-- | clang/test/Sema/block-misc.c | 8 |
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}} +} + |

