150
|
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
|
|
2 // rdar://8427922
|
|
3
|
|
4 struct 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
|
|
23 int 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 }
|
|
35
|
|
36 // rdar: // 8437253
|
|
37 extern "C" void exit(...);
|
|
38
|
|
39 struct CGPoint {
|
|
40 float x;
|
|
41 float y;
|
|
42 };
|
|
43 typedef struct CGPoint CGPoint;
|
|
44
|
|
45 extern "C" const CGPoint CGPointZero;
|
|
46
|
|
47 bool 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
|