aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-04-24 19:13:05 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-04-24 19:13:05 +0000
commit80abce3d1597edaf427f65ce15d8433f3f13315d (patch)
tree686452cd61fc7e2388f8d7173c6d4ff959796478 /lib/Sema/SemaObjCProperty.cpp
parente68cb08bd97c916edc907e59ca5ccdc5706a2b46 (diff)
Objective-C arc: Improve disgnostics when 'weak'
property cannot be synthesized because its backing ivar does not support weak references. // rdar://13676793 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 2efd43ee31..2162bf06e9 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -996,8 +996,10 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
PropertyIvarType->getAs<ObjCObjectPointerType>()) {
const ObjCInterfaceDecl *ObjI = ObjT->getInterfaceDecl();
if (ObjI && ObjI->isArcWeakrefUnavailable()) {
- Diag(PropertyDiagLoc, diag::err_arc_weak_unavailable_property);
- Diag(property->getLocation(), diag::note_property_declare);
+ Diag(property->getLocation(),
+ diag::err_arc_weak_unavailable_property) << PropertyIvarType;
+ Diag(ClassImpDecl->getLocation(), diag::note_implemented_by_class)
+ << ClassImpDecl->getName();
err = true;
}
}