From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaObjC/block-ivar.m | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 clang/test/SemaObjC/block-ivar.m (limited to 'clang/test/SemaObjC/block-ivar.m') 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 + -- cgit v1.2.3