forked from OSchip/llvm-project
[arcmt] Now that readonly properties are strong-by-default, do not add redundant 'strong'.
llvm-svn: 144136
This commit is contained in:
parent
5d08293999
commit
e4a38a73fd
|
@ -218,7 +218,7 @@ private:
|
|||
|
||||
if (HasIvarAssignedAPlusOneObject ||
|
||||
(Pass.isGCMigration() && !hasGCWeak(props, atLoc)))
|
||||
return doPropAction(PropAction_MaybeAddStrong, props, atLoc);
|
||||
return; // 'strong' by default.
|
||||
|
||||
return doPropAction(PropAction_MaybeAddWeakOrUnsafe, props, atLoc);
|
||||
}
|
||||
|
|
|
@ -64,10 +64,11 @@ __attribute__((objc_arc_weak_reference_unavailable))
|
|||
@property (assign) I4Impl * pds;
|
||||
@property (assign) I4Impl * pds2;
|
||||
@property (readwrite) I4Impl * pds3;
|
||||
@property (readonly) I4Impl * pds4;
|
||||
@end
|
||||
|
||||
@implementation I4Impl
|
||||
@synthesize pw1, pw2, ps, pds, pds2, pds3;
|
||||
@synthesize pw1, pw2, ps, pds, pds2, pds3, pds4;
|
||||
|
||||
-(void)test1:(CFTypeRef *)cft {
|
||||
id x = NSMakeCollectable(cft);
|
||||
|
|
|
@ -59,10 +59,11 @@ __attribute__((objc_arc_weak_reference_unavailable))
|
|||
@property I4Impl * pds;
|
||||
@property I4Impl * pds2;
|
||||
@property (readwrite) I4Impl * pds3;
|
||||
@property (readonly) I4Impl * pds4;
|
||||
@end
|
||||
|
||||
@implementation I4Impl
|
||||
@synthesize pw1, pw2, ps, pds, pds2, pds3;
|
||||
@synthesize pw1, pw2, ps, pds, pds2, pds3, pds4;
|
||||
|
||||
-(void)test1:(CFTypeRef *)cft {
|
||||
id x = CFBridgingRelease(cft);
|
||||
|
|
|
@ -32,8 +32,8 @@ typedef _NSCachedAttributedString *BadClassForWeak;
|
|||
@property (unsafe_unretained) NSObject *not_safe2;
|
||||
@property (unsafe_unretained) Forw *not_safe3;
|
||||
@property (readonly) Foo *assign_plus1;
|
||||
@property (strong, readonly) Foo *assign_plus2;
|
||||
@property (strong, readonly) Foo *assign_plus3;
|
||||
@property (readonly) Foo *assign_plus2;
|
||||
@property (readonly) Foo *assign_plus3;
|
||||
|
||||
@property (weak) Foo *no_user_ivar1;
|
||||
@property (weak, readonly) Foo *no_user_ivar2;
|
||||
|
|
Loading…
Reference in New Issue