if (RE->getDecl() != Ivar)
return true;
+ if (ObjCMessageExpr *
+ ME = dyn_cast<ObjCMessageExpr>(E->getRHS()->IgnoreParenCasts()))
+ if (ME->getMethodFamily() == OMF_retain)
+ return false;
+
ImplicitCastExpr *implCE = dyn_cast<ImplicitCastExpr>(E->getRHS());
while (implCE && implCE->getCastKind() == CK_BitCast)
implCE = dyn_cast<ImplicitCastExpr>(implCE->getSubExpr());
@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
@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