diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-12-09 22:36:47 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-12-09 22:36:47 +0000 |
commit | 7894c14c006941684f6c8964ed71c9b14c3f0edb (patch) | |
tree | ee654ba17dc514a6572fcb05fc7fac67e5612578 /test/ARCMT | |
parent | 0fb730a9672c49efdbfb202ba1416806919c6589 (diff) |
Objective-C SDK modernizer. Modernize to use
property-dot-syntax when receiver is 'super'.
rdar://19140267
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ARCMT')
-rw-r--r-- | test/ARCMT/objcmt-property-dot-syntax.m | 22 | ||||
-rw-r--r-- | test/ARCMT/objcmt-property-dot-syntax.m.result | 22 |
2 files changed, 44 insertions, 0 deletions
diff --git a/test/ARCMT/objcmt-property-dot-syntax.m b/test/ARCMT/objcmt-property-dot-syntax.m index 42aade5aca..0e25abcb89 100644 --- a/test/ARCMT/objcmt-property-dot-syntax.m +++ b/test/ARCMT/objcmt-property-dot-syntax.m @@ -37,3 +37,25 @@ P* fun(); - (P*) MethodReturnsPObj { return 0; } @end + +// rdar://19140267 +@interface Sub : P +@end + +@implementation Sub +- (int) Meth : (P*)array { + [super setCount : 100]; + + [super setCount : [array count]]; + + [[super PropertyReturnsPObj] setCount : [array count]]; + + [super setCount : (i1+i2*i3 - 100)]; + + return [super count] - + [(P*)0 count] + [array count] + + [fun() count] - + [[super PropertyReturnsPObj] count] + + [self->obj count]; +} +@end diff --git a/test/ARCMT/objcmt-property-dot-syntax.m.result b/test/ARCMT/objcmt-property-dot-syntax.m.result index 88006e9fc5..6822d44ac0 100644 --- a/test/ARCMT/objcmt-property-dot-syntax.m.result +++ b/test/ARCMT/objcmt-property-dot-syntax.m.result @@ -37,3 +37,25 @@ P* fun(); - (P*) MethodReturnsPObj { return 0; } @end + +// rdar://19140267 +@interface Sub : P +@end + +@implementation Sub +- (int) Meth : (P*)array { + super.count = 100; + + super.count = array.count; + + super.PropertyReturnsPObj.count = array.count; + + super.count = (i1+i2*i3 - 100); + + return super.count - + ((P*)0).count + array.count + + fun().count - + super.PropertyReturnsPObj.count + + self->obj.count; +} +@end |