summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/ARCMigrate')
-rw-r--r--clang/lib/ARCMigrate/TransProperties.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/ARCMigrate/TransProperties.cpp b/clang/lib/ARCMigrate/TransProperties.cpp
index 050512fbbec..7e890ef608f 100644
--- a/clang/lib/ARCMigrate/TransProperties.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud