diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-04-19 21:44:57 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-04-19 21:44:57 +0000 |
commit | 289677da2d3ef2f015af8b7e41150053891589f7 (patch) | |
tree | 6a5bafe9bfe0e65f29b04802cce8c801c2feabdd /lib/Sema/SemaPseudoObject.cpp | |
parent | 16c111ba8050c5a94f024524c5c0f433c30edf4f (diff) |
objective-c arc: Issue warning under -Wreceiver-is-weak
if receiver is a 'weak' property, by type or by attribute.
// rdar://10225276
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index 0e6632964a..078b0e4bc4 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -478,6 +478,8 @@ bool ObjCPropertyOpBuilder::findGetter() { if (RefExpr->isImplicitProperty()) { if ((Getter = RefExpr->getImplicitPropertyGetter())) { GetterSelector = Getter->getSelector(); + S.DiagnoseARCUseOfWeakReceiver(Getter, Getter->getResultType(), + RefExpr->getLocation()); return true; } else { @@ -497,6 +499,8 @@ bool ObjCPropertyOpBuilder::findGetter() { } ObjCPropertyDecl *prop = RefExpr->getExplicitProperty(); + S.DiagnoseARCUseOfWeakReceiver(prop, prop->getType(), + RefExpr->getLocation()); Getter = LookupMethodInReceiverType(S, prop->getGetterName(), RefExpr); return (Getter != 0); } |