1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc// rdar://7020493 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@protocol P1 5*f4a2713aSLionel Sambuc@optional 6*f4a2713aSLionel Sambuc- (int) PMeth; 7*f4a2713aSLionel Sambuc@required 8*f4a2713aSLionel Sambuc- (void) : (double) arg; // expected-note {{method ':' declared here}} 9*f4a2713aSLionel Sambuc@end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@interface NSImage <P1> 12*f4a2713aSLionel Sambuc- (void) initialize; // expected-note {{method 'initialize' declared here}} 13*f4a2713aSLionel Sambuc@end 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc@interface NSImage (AirPortUI) 16*f4a2713aSLionel Sambuc- (void) initialize; 17*f4a2713aSLionel Sambuc@end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc@interface NSImage() 20*f4a2713aSLionel Sambuc- (void) CEMeth; // expected-note {{method 'CEMeth' declared here}} 21*f4a2713aSLionel Sambuc@end 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc@implementation NSImage (AirPortUI) 24*f4a2713aSLionel Sambuc- (void) initialize {NSImage *p=0; [p initialize]; } // expected-warning {{category is implementing a method which will also be implemented by its primary class}} 25*f4a2713aSLionel Sambuc- (int) PMeth{ return 0; } 26*f4a2713aSLionel Sambuc- (void) : (double) arg{}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}} 27*f4a2713aSLionel Sambuc- (void) CEMeth {}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}} 28*f4a2713aSLionel Sambuc@end 29*f4a2713aSLionel Sambuc 30*f4a2713aSLionel Sambuc// rdar://10014946 31*f4a2713aSLionel Sambuctypedef char BOOL; 32*f4a2713aSLionel Sambuc@interface I 33*f4a2713aSLionel Sambuc{ 34*f4a2713aSLionel Sambuc BOOL allowsDeleting; 35*f4a2713aSLionel Sambuc} 36*f4a2713aSLionel Sambuc@property (nonatomic, assign, readwrite) BOOL allowsDeleting; 37*f4a2713aSLionel Sambuc@end 38*f4a2713aSLionel Sambuc 39*f4a2713aSLionel Sambuc@implementation I(CAT) 40*f4a2713aSLionel Sambuc- (BOOL) allowsDeleting { return 1; } 41*f4a2713aSLionel Sambuc@end 42