E = IDecl->instmeth_end(); I != E; ++I)
if (!(*I)->isSynthesized() && !InsMap.count((*I)->getSelector()))
WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl);
- else if (!(*I)->isSynthesized()){
+ else {
ObjCMethodDecl *ImpMethodDecl =
IMPDecl->getInstanceMethod((*I)->getSelector());
ObjCMethodDecl *IntfMethodDecl =
IDecl->getInstanceMethod((*I)->getSelector());
- WarnConflictingTypedMethods(ImpMethodDecl, IntfMethodDecl);
-
+ assert(IntfMethodDecl &&
+ "IntfMethodDecl is null in ImplMethodsVsClassMethods");
+ // ImpMethodDecl may be null as in a @dynamic property.
+ if (ImpMethodDecl)
+ WarnConflictingTypedMethods(ImpMethodDecl, IntfMethodDecl);
}
llvm::DenseSet<Selector> ClsMap;
bool IncompleteImpl = false;
for (ObjCCategoryDecl::instmeth_iterator I = CatClassDecl->instmeth_begin(),
E = CatClassDecl->instmeth_end(); I != E; ++I)
- if (!InsMap.count((*I)->getSelector()))
+ if (!(*I)->isSynthesized() && !InsMap.count((*I)->getSelector()))
WarnUndefinedMethod(CatImplDecl->getLocation(), *I, IncompleteImpl);
else {
ObjCMethodDecl *ImpMethodDecl =
CatImplDecl->getInstanceMethod((*I)->getSelector());
ObjCMethodDecl *IntfMethodDecl =
CatClassDecl->getInstanceMethod((*I)->getSelector());
- WarnConflictingTypedMethods(ImpMethodDecl, IntfMethodDecl);
+ assert(IntfMethodDecl &&
+ "IntfMethodDecl is null in ImplCategoryMethodsVsIntfMethods");
+ // ImpMethodDecl may be null as in a @dynamic property.
+ if (ImpMethodDecl)
+ WarnConflictingTypedMethods(ImpMethodDecl, IntfMethodDecl);
}
llvm::DenseSet<Selector> ClsMap;
@synthesize name; // OK! property with same name as an accessible ivar of same name
@end
-@implementation I(CAT) // expected-warning {{incomplete implementation}}, expected-warning {{method definition for 'd1' not found}}, // expected-warning {{method definition for 'setD1:' not found}}
+@implementation I(CAT)
@synthesize d1; // expected-error {{@synthesize not allowed in a category's implementation}}
@dynamic bad; // expected-error {{property implementation must have its declaration in the category 'CAT'}}
@end