diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-08-10 21:46:48 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-08-10 21:46:48 +0000 |
commit | 93db2277e6e993edfbbec97876abd3f327610e44 (patch) | |
tree | 9b0efbc521cd42e7bc50c73e025bae68d594aa26 /clang/test/ARCMT | |
parent | 37a62058fe51aa69b9001cb21e685b1039b3c29b (diff) | |
download | bcm5719-llvm-93db2277e6e993edfbbec97876abd3f327610e44.tar.gz bcm5719-llvm-93db2277e6e993edfbbec97876abd3f327610e44.zip |
[arcmt] When checking whether properties needs to be strong or not, take into account
that assigning result of -retain means it should be strong. rdar://9931757.
llvm-svn: 137252
Diffstat (limited to 'clang/test/ARCMT')
-rw-r--r-- | clang/test/ARCMT/assign-prop-with-arc-runtime.m | 8 | ||||
-rw-r--r-- | clang/test/ARCMT/assign-prop-with-arc-runtime.m.result | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/clang/test/ARCMT/assign-prop-with-arc-runtime.m b/clang/test/ARCMT/assign-prop-with-arc-runtime.m index 1671d6d0203..b328bfe1583 100644 --- a/clang/test/ARCMT/assign-prop-with-arc-runtime.m +++ b/clang/test/ARCMT/assign-prop-with-arc-runtime.m @@ -32,20 +32,20 @@ typedef _NSCachedAttributedString *BadClassForWeak; @property Forw *not_safe3; @property (readonly) Foo *assign_plus1; @property (readonly) Foo *assign_plus2; +@property (readonly) Foo *assign_plus3; @property (assign) Foo *no_user_ivar1; @property (readonly) Foo *no_user_ivar2; - --(void)test; @end @implementation Foo @synthesize x,w,q1,q2,oo,bcw,not_safe1,not_safe2,not_safe3; @synthesize no_user_ivar1, no_user_ivar2; -@synthesize assign_plus1, assign_plus2; +@synthesize assign_plus1, assign_plus2, assign_plus3; --(void)test { +-(void)test:(Foo *)parm { assign_plus1 = [[Foo alloc] init]; assign_plus2 = [Foo new]; + assign_plus3 = [parm retain]; } @end diff --git a/clang/test/ARCMT/assign-prop-with-arc-runtime.m.result b/clang/test/ARCMT/assign-prop-with-arc-runtime.m.result index d30a2ac00be..3dd903ea5b9 100644 --- a/clang/test/ARCMT/assign-prop-with-arc-runtime.m.result +++ b/clang/test/ARCMT/assign-prop-with-arc-runtime.m.result @@ -32,20 +32,20 @@ typedef _NSCachedAttributedString *BadClassForWeak; @property (unsafe_unretained) Forw *not_safe3; @property (readonly) Foo *assign_plus1; @property (strong, readonly) Foo *assign_plus2; +@property (strong, readonly) Foo *assign_plus3; @property (weak) Foo *no_user_ivar1; @property (weak, readonly) Foo *no_user_ivar2; - --(void)test; @end @implementation Foo @synthesize x,w,q1,q2,oo,bcw,not_safe1,not_safe2,not_safe3; @synthesize no_user_ivar1, no_user_ivar2; -@synthesize assign_plus1, assign_plus2; +@synthesize assign_plus1, assign_plus2, assign_plus3; --(void)test { +-(void)test:(Foo *)parm { assign_plus1 = [[Foo alloc] init]; assign_plus2 = [Foo new]; + assign_plus3 = parm; } @end |