summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-08 05:56:11 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-08 05:56:11 +0000
commitdbe077a89da99afcb551ee0722e78f3dfcacf0b0 (patch)
tree96d5236dae24fe7f36d67e8784ce09f68986c853 /clang/lib
parent3befb8cd8af2031657fb4f3bea495588b6f9cb4e (diff)
downloadbcm5719-llvm-dbe077a89da99afcb551ee0722e78f3dfcacf0b0.tar.gz
bcm5719-llvm-dbe077a89da99afcb551ee0722e78f3dfcacf0b0.zip
[arcmt] Now that properties are strong by default, avoid adding redundant '(strong)'
property attribute. llvm-svn: 144078
Diffstat (limited to 'clang/lib')
-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