brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 58d84ff Raw
40 lines · plain
1// RUN: %clang_cc1  -fsyntax-only -verify %s2 3@protocol P14@optional5- (int) PMeth;6@required7- (void) : (double) arg; // expected-note {{method ':' declared here}}8@end9 10@interface NSImage <P1>11- (void) initialize; // expected-note {{method 'initialize' declared here}}12@end13 14@interface NSImage (AirPortUI)15- (void) initialize;16@end17 18@interface NSImage()19- (void) CEMeth; // expected-note {{method 'CEMeth' declared here}}20@end21 22@implementation NSImage (AirPortUI)23- (void) initialize {NSImage *p=0; [p initialize]; } // expected-warning {{category is implementing a method which will also be implemented by its primary class}}24- (int) PMeth{ return 0; }25- (void) : (double) arg{}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}}26- (void) CEMeth {}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}}27@end28 29typedef char BOOL;30@interface I31{32  BOOL allowsDeleting;33}34@property (nonatomic, assign, readwrite) BOOL allowsDeleting;35@end36 37@implementation I(CAT)38- (BOOL) allowsDeleting { return 1; }39@end40