annotate clang/test/CodeGenObjCXX/property-dot-copy.mm @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
anatofuz
parents:
diff changeset
2 // rdar://8427922
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 struct Vector3D
anatofuz
parents:
diff changeset
5 {
anatofuz
parents:
diff changeset
6 float x, y, z;
anatofuz
parents:
diff changeset
7 Vector3D();
anatofuz
parents:
diff changeset
8 Vector3D(const Vector3D &inVector);
anatofuz
parents:
diff changeset
9 Vector3D(float initX, float initY, float initZ);
anatofuz
parents:
diff changeset
10 Vector3D &operator=(const Vector3D & rhs);
anatofuz
parents:
diff changeset
11 };
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 @interface Object3D
anatofuz
parents:
diff changeset
14 {
anatofuz
parents:
diff changeset
15 Vector3D position;
anatofuz
parents:
diff changeset
16 Vector3D length;
anatofuz
parents:
diff changeset
17 }
anatofuz
parents:
diff changeset
18 @property (assign) Vector3D position;
anatofuz
parents:
diff changeset
19 - (Vector3D) length;
anatofuz
parents:
diff changeset
20 - (void) setLength: (Vector3D)arg;
anatofuz
parents:
diff changeset
21 @end
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 int main ()
anatofuz
parents:
diff changeset
24 {
anatofuz
parents:
diff changeset
25 Object3D *myObject;
anatofuz
parents:
diff changeset
26 Vector3D V3D(1.0f, 1.0f, 1.0f);
anatofuz
parents:
diff changeset
27 // CHECK: call void @_ZN8Vector3DC1ERKS_
anatofuz
parents:
diff changeset
28 myObject.position = V3D;
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 // CHECK: call void @_ZN8Vector3DC1ERKS_
anatofuz
parents:
diff changeset
31 myObject.length = V3D;
anatofuz
parents:
diff changeset
32
anatofuz
parents:
diff changeset
33 return 0;
anatofuz
parents:
diff changeset
34 }
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 // rdar: // 8437253
anatofuz
parents:
diff changeset
37 extern "C" void exit(...);
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39 struct CGPoint {
anatofuz
parents:
diff changeset
40 float x;
anatofuz
parents:
diff changeset
41 float y;
anatofuz
parents:
diff changeset
42 };
anatofuz
parents:
diff changeset
43 typedef struct CGPoint CGPoint;
anatofuz
parents:
diff changeset
44
anatofuz
parents:
diff changeset
45 extern "C" const CGPoint CGPointZero;
anatofuz
parents:
diff changeset
46
anatofuz
parents:
diff changeset
47 bool operator==(const CGPoint& a, const CGPoint& b);
anatofuz
parents:
diff changeset
48
anatofuz
parents:
diff changeset
49 @interface TIconViewSettings
anatofuz
parents:
diff changeset
50 @property (assign, nonatomic) CGPoint gridOffset;
anatofuz
parents:
diff changeset
51 @end
anatofuz
parents:
diff changeset
52
anatofuz
parents:
diff changeset
53 @implementation TIconViewSettings
anatofuz
parents:
diff changeset
54 - (CGPoint) gridOffset
anatofuz
parents:
diff changeset
55 {
anatofuz
parents:
diff changeset
56 return CGPointZero;
anatofuz
parents:
diff changeset
57 }
anatofuz
parents:
diff changeset
58
anatofuz
parents:
diff changeset
59 - (void) foo
anatofuz
parents:
diff changeset
60 {
anatofuz
parents:
diff changeset
61 if ((self.gridOffset) == CGPointZero)
anatofuz
parents:
diff changeset
62 exit(1);
anatofuz
parents:
diff changeset
63
anatofuz
parents:
diff changeset
64 if (self.gridOffset == CGPointZero)
anatofuz
parents:
diff changeset
65 exit(1);
anatofuz
parents:
diff changeset
66 }
anatofuz
parents:
diff changeset
67 @end
anatofuz
parents:
diff changeset
68