void maybeAddStrongAttr(PropsTy &props, SourceLocation atLoc) const {
ObjCPropertyDecl::PropertyAttributeKind propAttrs = getPropertyAttrs(props);
- if (!(propAttrs & ObjCPropertyDecl::OBJC_PR_readonly) ||
- !hasAllIvarsBacked(props)) {
+ if (!(propAttrs & ObjCPropertyDecl::OBJC_PR_readonly))
+ return; // 'strong' by default.
+
+ if (!hasAllIvarsBacked(props)) {
addAttribute("strong", atLoc);
}
@interface I4Impl {
I4Impl *pds2;
+ I4Impl *pds3;
}
@property (assign) I4Impl *__weak pw1, *__weak pw2;
@property (assign) I4Impl *__strong ps;
@property (assign) I4Impl * pds;
@property (assign) I4Impl * pds2;
+@property (readwrite) I4Impl * pds3;
@end
@implementation I4Impl
-@synthesize pw1, pw2, ps, pds, pds2;
+@synthesize pw1, pw2, ps, pds, pds2, pds3;
-(void)test1:(CFTypeRef *)cft {
id x = NSMakeCollectable(cft);
@interface I4Impl {
I4Impl *pds2;
+ I4Impl *pds3;
}
@property (weak) I4Impl * pw1, * pw2;
@property I4Impl * ps;
@property I4Impl * pds;
@property I4Impl * pds2;
+@property (readwrite) I4Impl * pds3;
@end
@implementation I4Impl
-@synthesize pw1, pw2, ps, pds, pds2;
+@synthesize pw1, pw2, ps, pds, pds2, pds3;
-(void)test1:(CFTypeRef *)cft {
id x = CFBridgingRelease(cft);