brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · dad8575 Raw
67 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s2 3struct Vector3D4{5		float x, y, z;6		Vector3D();7		Vector3D(const Vector3D &inVector);8		Vector3D(float initX, float initY, float initZ);9		Vector3D &operator=(const Vector3D & rhs);10};11 12@interface Object3D13{14	Vector3D position;15        Vector3D length;16}17@property (assign) Vector3D position;18- (Vector3D) length;19- (void) setLength: (Vector3D)arg;20@end21 22int main () 23{24	Object3D *myObject;25        Vector3D V3D(1.0f, 1.0f, 1.0f);26// CHECK: call void @_ZN8Vector3DC1ERKS_27	myObject.position = V3D;28 29// CHECK: call void @_ZN8Vector3DC1ERKS_30	myObject.length = V3D;31 32        return 0;33}34 35extern "C" void exit(...);36 37struct CGPoint {38  float x;39  float y;40};41typedef struct CGPoint CGPoint;42 43extern "C" const CGPoint CGPointZero;44 45bool operator==(const CGPoint& a, const CGPoint& b);46 47@interface TIconViewSettings48@property (assign, nonatomic) CGPoint gridOffset;49@end50 51@implementation TIconViewSettings52- (CGPoint) gridOffset53{54 return CGPointZero;55}56 57- (void) foo58{59        if ((self.gridOffset) == CGPointZero)60                exit(1);61 62 if (self.gridOffset == CGPointZero)63  exit(1);64}65@end66 67