summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/block-ivar.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/block-ivar.m')
-rw-r--r--clang/test/SemaObjC/block-ivar.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/block-ivar.m b/clang/test/SemaObjC/block-ivar.m
new file mode 100644
index 0000000..c7ea1d9
--- /dev/null
+++ b/clang/test/SemaObjC/block-ivar.m
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks
+
+@interface NSObject {
+ struct objc_object *isa;
+}
+@end
+@interface Foo : NSObject {
+ int _prop;
+}
+@end
+
+@implementation Foo
+- (int)doSomething {
+ int (^blk)(void) = ^{ return _prop; };
+ return blk();
+}
+
+@end
+