Fariborz Jahanian | f2d74cc | 2011-03-27 19:53:47 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 | // rdar://9181463 | ||||
3 | |||||
4 | typedef struct objc_class *Class; | ||||
5 | |||||
6 | typedef struct objc_object { | ||||
7 | Class isa; | ||||
8 | } *id; | ||||
9 | |||||
10 | @interface NSObject | ||||
11 | + (id) alloc; | ||||
12 | @end | ||||
13 | |||||
14 | |||||
15 | void foo(Class self) { | ||||
16 | [self alloc]; | ||||
17 | } | ||||
18 | |||||
19 | void bar(Class self) { | ||||
20 | Class y = self; | ||||
21 | [y alloc]; | ||||
22 | } | ||||
23 |