[arcmt] Now that properties are strong by default, avoid adding redundant '(strong)'
property attribute.
llvm-svn: 144078
diff --git a/clang/lib/ARCMigrate/TransProperties.cpp b/clang/lib/ARCMigrate/TransProperties.cpp
index 050512f..7e890ef 100644
--- a/clang/lib/ARCMigrate/TransProperties.cpp
+++ b/clang/lib/ARCMigrate/TransProperties.cpp
@@ -287,8 +287,10 @@
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);
}