forked from OSchip/llvm-project
Properties cannot be synthesized by-dafult in
categories. Issue usual warnings instead of confusing error message. Radar 7920807 llvm-svn: 102645
This commit is contained in:
parent
dfcd0661a1
commit
9e1a3af030
|
@ -810,7 +810,7 @@ void Sema::DiagnoseUnimplementedProperties(ObjCImplDecl* IMPDecl,
|
|||
Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional ||
|
||||
PropImplMap.count(Prop))
|
||||
continue;
|
||||
if (LangOpts.ObjCNonFragileABI2) {
|
||||
if (LangOpts.ObjCNonFragileABI2 && !isa<ObjCCategoryImplDecl>(IMPDecl)) {
|
||||
ActOnPropertyImplDecl(IMPDecl->getLocation(),
|
||||
IMPDecl->getLocation(),
|
||||
true, DeclPtrTy::make(IMPDecl),
|
||||
|
|
|
@ -93,3 +93,13 @@
|
|||
@end
|
||||
|
||||
@implementation SubClass @end // expected-error {{property 'myString' attempting to use ivar 'myString' declared in super class 'TopClass'}}
|
||||
|
||||
// rdar: // 7920807
|
||||
@interface C @end
|
||||
@interface C (Category)
|
||||
@property int p; // expected-warning {{property 'p' requires method 'p' to be defined }} \
|
||||
// expected-warning {{property 'p' requires method 'setP:' to be defined}}
|
||||
@end
|
||||
@implementation C (Category) // expected-note 2 {{implementation is here}}
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in New Issue