]> granicus.if.org Git - clang/commitdiff
[arcmt] Add weak/unsafe_unretained for "@property (readonly)" when we are @synthesizi...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 13 Jul 2011 19:47:57 +0000 (19:47 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 13 Jul 2011 19:47:57 +0000 (19:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135067 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ARCMigrate/TransProperties.cpp
test/ARCMT/assign-prop-with-arc-runtime.m
test/ARCMT/assign-prop-with-arc-runtime.m.result

index 3a334f943265e21552ae37b30ece822876df79d3..872c95e1a4446927363bbf668ff2c4e4e1c2ed7e 100644 (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;
index 32d30e53e424c0682c015a66136e8c68cecd032a..4e4ae774a25c289da0bb30caef3fd987b4b0524f 100644 (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
index 3a6c349405a68759366cec571f7c015bcd3885d8..eb34c168e406a1f473942b5db899687b3ab1d184 100644 (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