diff options
Diffstat (limited to 'test/SemaObjC/arc-invalid.m')
-rw-r--r-- | test/SemaObjC/arc-invalid.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaObjC/arc-invalid.m b/test/SemaObjC/arc-invalid.m index b07460dbec..c736ed4a16 100644 --- a/test/SemaObjC/arc-invalid.m +++ b/test/SemaObjC/arc-invalid.m @@ -11,3 +11,8 @@ void takeBlock(void (^)(void)); void test0(id p) { takeBlock(^{ [p foo] + p; }); // expected-error {{invalid operands to binary expression}} } + +void test1(void) { + __autoreleasing id p; // expected-note {{'p' declared here}} + takeBlock(^{ (void) p; }); // expected-error {{cannot capture __autoreleasing variable in a block}} +} |