summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaPseudoObject.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2016-05-25 05:41:57 +0000
committerBob Wilson <bob.wilson@apple.com>2016-05-25 05:41:57 +0000
commit756a4a5956a4c162021fa96f5cca81188811f7ed (patch)
treef0d9d8442d7345f110e90ea504d55ae55d0f0af1 /lib/Sema/SemaPseudoObject.cpp
parentff8e258e28d0cbffe39fed0caa560f6e85293544 (diff)
arc-repeated-use-of-weak should not warn about IBOutlet properties
Revision r211132 was supposed to disable -Warc-repeated-use-of-weak for Objective-C properties marked with the IBOutlet attribute. Those properties are supposed to be weak but they are only accessed from the main thread so there is no risk of asynchronous updates setting them to nil. That combination makes -Warc-repeated-use-of-weak very noisy. The previous change only handled one kind of access to weak IBOutlet properties. Instead of trying to add checks for all the different kinds of property accesses, this patch removes the previous special case check and adds a check at the point where the diagnostic is reported. rdar://21366461 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r--lib/Sema/SemaPseudoObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp
index 62c823b363..c93d800f96 100644
--- a/lib/Sema/SemaPseudoObject.cpp
+++ b/lib/Sema/SemaPseudoObject.cpp
@@ -578,7 +578,7 @@ bool ObjCPropertyOpBuilder::isWeakProperty() const {
if (RefExpr->isExplicitProperty()) {
const ObjCPropertyDecl *Prop = RefExpr->getExplicitProperty();
if (Prop->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_weak)
- return !Prop->hasAttr<IBOutletAttr>();
+ return true;
T = Prop->getType();
} else if (Getter) {