summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp2
-rw-r--r--clang/test/SemaObjC/default-synthesize.m14
2 files changed, 15 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index d47d6c2994f..1d27e44dbe7 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -812,7 +812,7 @@ void Sema::DiagnoseUnimplementedProperties(ObjCImplDecl* IMPDecl,
continue;
if (LangOpts.ObjCNonFragileABI2) {
ActOnPropertyImplDecl(IMPDecl->getLocation(),
- SourceLocation(),
+ IMPDecl->getLocation(),
true, DeclPtrTy::make(IMPDecl),
Prop->getIdentifier(),
Prop->getIdentifier());
diff --git a/clang/test/SemaObjC/default-synthesize.m b/clang/test/SemaObjC/default-synthesize.m
index 45a3710dcf5..b892dfadf4f 100644
--- a/clang/test/SemaObjC/default-synthesize.m
+++ b/clang/test/SemaObjC/default-synthesize.m
@@ -79,3 +79,17 @@
}
@end
+@protocol TopProtocol
+ @property (readonly) id myString;
+@end
+
+@interface TopClass <TopProtocol>
+{
+ id myString; // expected-note {{previously declared 'myString' here}}
+}
+@end
+
+@interface SubClass : TopClass <TopProtocol>
+@end
+
+@implementation SubClass @end // expected-error {{property 'myString' attempting to use ivar 'myString' declared in super class 'TopClass'}}
OpenPOWER on IntegriCloud