diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-03-20 17:22:23 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-03-20 17:22:23 +0000 |
commit | 150abf2a00362f13525e2e5929dd40bfcd5dfa13 (patch) | |
tree | f7caf2a1e78d632bd36abffca6a244e2ec6315f4 /clang/test/CodeGenObjC/super-dotsyntax-property.m | |
parent | 88c347443e1ccfad821698b00275681ba5062148 (diff) | |
download | bcm5719-llvm-150abf2a00362f13525e2e5929dd40bfcd5dfa13.tar.gz bcm5719-llvm-150abf2a00362f13525e2e5929dd40bfcd5dfa13.zip |
Implement ir gen. for setter/getter applied to 'super'
in a property dot-syntax notation.
llvm-svn: 67382
Diffstat (limited to 'clang/test/CodeGenObjC/super-dotsyntax-property.m')
-rw-r--r-- | clang/test/CodeGenObjC/super-dotsyntax-property.m | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/super-dotsyntax-property.m b/clang/test/CodeGenObjC/super-dotsyntax-property.m new file mode 100644 index 00000000000..8c51cfc5336 --- /dev/null +++ b/clang/test/CodeGenObjC/super-dotsyntax-property.m @@ -0,0 +1,33 @@ +// RUN: clang -emit-llvm -o %t %s + +@interface B + +(int) classGetter; + +(void) setClassGetter:(int) arg; + + -(int) getter; + -(void) setGetter:(int)arg; +@end + +@interface A : B +@end + +@implementation A ++(int) classGetter { + return 0; +} + ++(int) classGetter2 { + super.classGetter = 100; + return super.classGetter; +} + +-(void) method { + super.getter = 200; + int x = super.getter; +} +@end + +void f0() { + int l1 = A.classGetter; + int l2 = [A classGetter2]; +} |