brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · cd5bddc Raw
72 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s2 3@interface I4- Meth; // expected-note 2 {{method 'Meth' declared here}}5- unavailableMeth __attribute__((availability(macosx,unavailable)));6- unavailableMeth2 __attribute__((unavailable));7@end8 9@implementation  I  // expected-warning {{method definition for 'Meth' not found}}10@end11 12@implementation I(CAT)13- Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}14@end15 16@interface MyClass17-(void)mymeth __attribute__((availability(macos, introduced=100))); // expected-note{{here}}18@end19@implementation MyClass // expected-warning{{'mymeth' not found}}20@end21 22#pragma GCC diagnostic ignored "-Wincomplete-implementation"23@interface I224- Meth; // expected-note{{method 'Meth' declared here}}25@end26 27@implementation  I228@end29 30@implementation I2(CAT)31- Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}32@end33 34@interface Q35@end36 37@implementation Q38 39__attribute__((visibility("default")))40@interface QN // expected-error {{Objective-C declarations may only appear in global scope}}41{42}43@end44 45@end46 47typedef char BOOL;48 49@protocol NSObject50- (BOOL)isEqual:(id)object;51@end52 53@interface NSObject <NSObject>54@end55 56@protocol NSApplicationDelegate <NSObject>57- (void)ImpleThisMethod; // expected-note {{method 'ImpleThisMethod' declared here}}58@end59 60@interface AppDelegate : NSObject <NSApplicationDelegate>61@end62 63@implementation AppDelegate (MRRCategory)64 65- (BOOL)isEqual:(id)object66{67    return __objc_no;68}69 70- (void)ImpleThisMethod {} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}71@end72