diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-12-12 23:40:14 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-12-12 23:40:14 +0000 |
commit | 6d69ac8b8a8c4da520da20dd67cca5da264b53dc (patch) | |
tree | 5885fe4a688d768a35be111470669a5a19ef7685 /clang/lib/Sema/SemaObjCProperty.cpp | |
parent | 96afec1defa2f5483e7f583ea4d15b94ccb7eb2a (diff) | |
download | bcm5719-llvm-6d69ac8b8a8c4da520da20dd67cca5da264b53dc.tar.gz bcm5719-llvm-6d69ac8b8a8c4da520da20dd67cca5da264b53dc.zip |
Enhance "auto synthesis will not synthesize property in protocol" to include property and protocol name.
Implements <rdar://problem/15617839>.
llvm-svn: 197187
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index f70e84d7a06..78e774b39ff 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/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; } |