diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-08 05:56:11 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-08 05:56:11 +0000 |
commit | ae7c25dab5ed7c8fc05462c8daf48e7d0945d364 (patch) | |
tree | 6ce792ea56965cdd45efafe39de9e863df942c1e /lib/ARCMigrate/TransProperties.cpp | |
parent | 263d66718365aadc621c3feb9badedf46d787e0e (diff) |
[arcmt] Now that properties are strong by default, avoid adding redundant '(strong)'
property attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate/TransProperties.cpp')
-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); } |