forked from OSchip/llvm-project
[SDK modernizer PATCH]. Fixes a bug whereby a call to super
was not converted to property-dot syntax by removing an unused code. rdar://19140267 llvm-svn: 233019
This commit is contained in:
parent
fd77f8cf80
commit
98253306f3
|
@ -255,11 +255,6 @@ namespace {
|
||||||
if (!Method->isPropertyAccessor())
|
if (!Method->isPropertyAccessor())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const ObjCInterfaceDecl *IFace =
|
|
||||||
NS.getASTContext().getObjContainingInterface(Method);
|
|
||||||
if (!IFace)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
const ObjCPropertyDecl *Prop = Method->findPropertyDecl();
|
const ObjCPropertyDecl *Prop = Method->findPropertyDecl();
|
||||||
if (!Prop)
|
if (!Prop)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -3,8 +3,15 @@
|
||||||
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
|
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
|
||||||
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
|
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
|
||||||
|
|
||||||
|
@class NSString;
|
||||||
|
|
||||||
|
// rdar://19140267
|
||||||
|
@protocol NSObject
|
||||||
|
@property (readonly, copy) NSString *description;
|
||||||
|
@end
|
||||||
|
|
||||||
// rdar://18498572
|
// rdar://18498572
|
||||||
@interface NSObject @end
|
@interface NSObject <NSObject> @end
|
||||||
|
|
||||||
@interface P : NSObject
|
@interface P : NSObject
|
||||||
{
|
{
|
||||||
|
@ -36,6 +43,8 @@ P* fun();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (P*) MethodReturnsPObj { return 0; }
|
- (P*) MethodReturnsPObj { return 0; }
|
||||||
|
|
||||||
|
- (NSString *)description { return [super description]; }
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// rdar://19140267
|
// rdar://19140267
|
||||||
|
|
|
@ -3,8 +3,15 @@
|
||||||
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
|
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
|
||||||
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
|
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
|
||||||
|
|
||||||
|
@class NSString;
|
||||||
|
|
||||||
|
// rdar://19140267
|
||||||
|
@protocol NSObject
|
||||||
|
@property (readonly, copy) NSString *description;
|
||||||
|
@end
|
||||||
|
|
||||||
// rdar://18498572
|
// rdar://18498572
|
||||||
@interface NSObject @end
|
@interface NSObject <NSObject> @end
|
||||||
|
|
||||||
@interface P : NSObject
|
@interface P : NSObject
|
||||||
{
|
{
|
||||||
|
@ -36,6 +43,8 @@ P* fun();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (P*) MethodReturnsPObj { return 0; }
|
- (P*) MethodReturnsPObj { return 0; }
|
||||||
|
|
||||||
|
- (NSString *)description { return super.description; }
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// rdar://19140267
|
// rdar://19140267
|
||||||
|
@ -86,7 +95,7 @@ id testRdar19038838(Rdar19038838 *obj) {
|
||||||
{
|
{
|
||||||
obj.count = 100;
|
obj.count = 100;
|
||||||
[some setCount : [some count]];
|
[some setCount : [some count]];
|
||||||
[qsome setCount : [qsome count]];
|
qsome.count = qsome.count;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue