diff options
author | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
commit | f27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch) | |
tree | ce7d964cbb5e39695b71481698f10cb099c23d4a /test/CodeGenObjC/property.m | |
download | FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz |
Import Clang, at r72732.
Diffstat (limited to 'test/CodeGenObjC/property.m')
-rw-r--r-- | test/CodeGenObjC/property.m | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/CodeGenObjC/property.m b/test/CodeGenObjC/property.m new file mode 100644 index 0000000..264adf1 --- /dev/null +++ b/test/CodeGenObjC/property.m @@ -0,0 +1,52 @@ +// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s + +#include <stdio.h> + +@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 |