diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-04-21 18:57:20 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-04-21 18:57:20 +0000 |
| commit | 422cb2186229df92e18b8e7511e99c676d5d8c36 (patch) | |
| tree | 8c8b5f5453f64be82b0d5b46bedbc98890d42a9d | |
| parent | a01874bf44d7b2cdd2f2189ef07d68e1dc4c9b65 (diff) | |
| download | bcm5719-llvm-422cb2186229df92e18b8e7511e99c676d5d8c36.tar.gz bcm5719-llvm-422cb2186229df92e18b8e7511e99c676d5d8c36.zip | |
Improve on source location of diagnostic when default
property synthesis is using a super class ivar.
llvm-svn: 102011
| -rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 2 | ||||
| -rw-r--r-- | clang/test/SemaObjC/default-synthesize.m | 14 |
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'}} |

