1 | // RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s |
---|---|
2 | // expected-no-diagnostics |
3 | // rdar://9181463 |
4 | |
5 | typedef struct objc_class *Class; |
6 | |
7 | typedef struct objc_object { |
8 | Class isa; |
9 | } *id; |
10 | |
11 | @interface NSObject |
12 | + (id) alloc; |
13 | @end |
14 | |
15 | |
16 | void foo(Class self) { |
17 | [self alloc]; |
18 | (^() { |
19 | [self alloc]; |
20 | })(); |
21 | } |
22 | |
23 | void bar(Class self) { |
24 | Class y = self; |
25 | [y alloc]; |
26 | } |
27 | |
28 |