blob: a14ad909dde38fcf2a8e41500b3075331e891698 [file] [log] [blame]
Fariborz Jahanianb4602102011-03-28 16:23:34 +00001// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Fariborz Jahanianf2d74cc2011-03-27 19:53:47 +00003// rdar://9181463
4
5typedef struct objc_class *Class;
6
7typedef struct objc_object {
8 Class isa;
9} *id;
10
11@interface NSObject
12+ (id) alloc;
13@end
14
15
16void foo(Class self) {
17 [self alloc];
Fariborz Jahanianb4602102011-03-28 16:23:34 +000018 (^() {
19 [self alloc];
20 })();
Fariborz Jahanianf2d74cc2011-03-27 19:53:47 +000021}
22
23void bar(Class self) {
24 Class y = self;
25 [y alloc];
26}
27