Files
clang-p2996/clang/test/CodeGenObjC/property.m
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00

53 lines
775 B
Objective-C

// RUN: %clang_cc1 -emit-llvm -o %t %s
int printf(const char *, ...);
@interface Root
-(id) alloc;
-(id) init;
@end
@interface A : Root {
int x;
int y, ro, z;
id ob0, ob1, ob2, ob3, ob4;
}
@property int x;
@property int y;
@property int z;
@property(readonly) int ro;
@property(assign) id ob0;
@property(retain) id ob1;
@property(copy) id ob2;
@property(retain, nonatomic) id ob3;
@property(copy, nonatomic) id ob4;
@end
@implementation A
@dynamic x;
@synthesize y;
@synthesize z = z;
@synthesize ro;
@synthesize ob0;
@synthesize ob1;
@synthesize ob2;
@synthesize ob3;
@synthesize ob4;
-(int) y {
return x + 1;
}
-(void) setZ: (int) arg {
x = arg - 1;
}
@end
@interface A (Cat)
@property int dyn;
@end
@implementation A (Cat)
-(int) dyn {
return 10;
}
@end