blob: 9b23c58ca17b41ca7eac4ba888f95a9e43314dbf [file] [log] [blame]
Fariborz Jahanianc4e1a682010-09-14 23:02:38 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-nonfragile-abi -o - %s | FileCheck %s
2// rdar://8427922
3
4struct Vector3D
5{
6 float x, y, z;
7 Vector3D();
8 Vector3D(const Vector3D &inVector);
9 Vector3D(float initX, float initY, float initZ);
10 Vector3D &operator=(const Vector3D & rhs);
11};
12
13@interface Object3D
14{
15 Vector3D position;
16 Vector3D length;
17}
18@property (assign) Vector3D position;
19- (Vector3D) length;
20- (void) setLength: (Vector3D)arg;
21@end
22
23int main ()
24{
25 Object3D *myObject;
26 Vector3D V3D(1.0f, 1.0f, 1.0f);
27// CHECK: call void @_ZN8Vector3DC1ERKS_
28 myObject.position = V3D;
29
30// CHECK: call void @_ZN8Vector3DC1ERKS_
31 myObject.length = V3D;
32
33 return 0;
34}
Fariborz Jahanianeb17e8b2010-09-17 20:45:45 +000035
36// rdar: // 8437253
37extern "C" void exit(...);
38
39struct CGPoint {
40 float x;
41 float y;
42};
43typedef struct CGPoint CGPoint;
44
45extern "C" const CGPoint CGPointZero;
46
47bool operator==(const CGPoint& a, const CGPoint& b);
48
49@interface TIconViewSettings
50@property (assign, nonatomic) CGPoint gridOffset;
51@end
52
53@implementation TIconViewSettings
54- (CGPoint) gridOffset
55{
56 return CGPointZero;
57}
58
59- (void) foo
60{
61 if ((self.gridOffset) == CGPointZero)
62 exit(1);
63
64 if (self.gridOffset == CGPointZero)
65 exit(1);
66}
67@end
68