зеркало из https://github.com/microsoft/clang-1.git
Improve on source location of diagnostic when default
property synthesis is using a super class ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102011 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
9a68a67c6a
Коммит
d502a94461
|
@ -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());
|
||||
|
|
|
@ -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'}}
|
||||
|
|
Загрузка…
Ссылка в новой задаче