diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ARCMigrate/TransProperties.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ARCMigrate/TransProperties.cpp b/lib/ARCMigrate/TransProperties.cpp index 050512fbbe..7e890ef608 100644 --- a/lib/ARCMigrate/TransProperties.cpp +++ b/lib/ARCMigrate/TransProperties.cpp @@ -287,8 +287,10 @@ private: 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); } |