[arcmt] Add weak/unsafe_unretained for "@property (readonly)" when we are @synthesizing it.

llvm-svn: 135067
This commit is contained in:
Argyrios Kyrtzidis 2011-07-13 19:47:57 +00:00
parent e255be93a8
commit de223c3a7b
3 changed files with 7 additions and 5 deletions

View File

@ -307,7 +307,7 @@ private:
bool hasNoBackingIvars(PropsTy &props) const {
for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I)
if (isUserDeclared(I->IvarD))
if (I->IvarD)
return false;
return true;

View File

@ -30,10 +30,11 @@ typedef _NSCachedAttributedString *BadClassForWeak;
@property () NSObject *not_safe2;
@property Forw *not_safe3;
@property (assign) Foo *no_back_ivar;
@property (assign) Foo *no_user_ivar1;
@property (readonly) Foo *no_user_ivar2;
@end
@implementation Foo
@synthesize x,w,q1,q2,oo,bcw,not_safe1,not_safe2,not_safe3;
@synthesize no_back_ivar;
@synthesize no_user_ivar1, no_user_ivar2;
@end

View File

@ -30,10 +30,11 @@ typedef _NSCachedAttributedString *BadClassForWeak;
@property (unsafe_unretained) NSObject *not_safe2;
@property (unsafe_unretained) Forw *not_safe3;
@property (weak) Foo *no_back_ivar;
@property (weak) Foo *no_user_ivar1;
@property (weak, readonly) Foo *no_user_ivar2;
@end
@implementation Foo
@synthesize x,w,q1,q2,oo,bcw,not_safe1,not_safe2,not_safe3;
@synthesize no_back_ivar;
@synthesize no_user_ivar1, no_user_ivar2;
@end