Add more reference-binding examples from the C++0x working paper, all of which seem...
[clang.git] / test / CodeGenObjC / objc2-ivar-assign.m
blobe50cc5b53729c037c8aaaf5e30536c89063b57ee
1 // RUN: %clang_cc1 -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o %t %s
2 // RUN: grep objc_assign_ivar %t | count 6
4 @interface I @end
6 typedef I TI;
7 typedef I* TPI;
9 typedef id ID;
11 @interface MyClass {
14 @property id property;
15 @property I* propertyI;
17 @property TI* propertyTI;
19 @property TPI propertyTPI;
21 @property ID propertyID;
22 @end
24 @implementation MyClass
25         @synthesize property=_property;
26         @synthesize propertyI;
27         @synthesize propertyTI=_propertyTI;
28         @synthesize propertyTPI=_propertyTPI;
29          @synthesize propertyID = _propertyID;
30 @end
32 int main () {
33     MyClass *myObj;
34     myObj.property = 0;
35     myObj.propertyI = 0;
36     myObj.propertyTI = 0;
37     myObj.propertyTPI = 0;
38     myObj.propertyID = 0;
39     return 0;