summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-12-12 23:40:14 +0000
committerTed Kremenek <kremenek@apple.com>2013-12-12 23:40:14 +0000
commit5184f04d3cc445340846840042e2dc7756a509fe (patch)
tree3f685d49554ba6d4137c218f9332afb13b382f84 /lib/Sema/SemaObjCProperty.cpp
parentff97893e710422195451c602f034a3d7ecccef16 (diff)
Enhance "auto synthesis will not synthesize property in protocol" to include property and protocol name.
Implements <rdar://problem/15617839>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197187 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 f70e84d7a0..78e774b39f 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -1574,10 +1574,12 @@ void Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl* IMPDecl,
}
continue;
}
- if (isa<ObjCProtocolDecl>(Prop->getDeclContext())) {
+ if (ObjCProtocolDecl *Proto =
+ dyn_cast<ObjCProtocolDecl>(Prop->getDeclContext())) {
// We won't auto-synthesize properties declared in protocols.
Diag(IMPDecl->getLocation(),
- diag::warn_auto_synthesizing_protocol_property);
+ diag::warn_auto_synthesizing_protocol_property)
+ << Prop << Proto;
Diag(Prop->getLocation(), diag::note_property_declare);
continue;
}