1// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s
2
3@interface I
4- Meth; // expected-note 2 {{method 'Meth' declared here}}
5- unavailableMeth __attribute__((availability(macosx,unavailable)));
6- unavailableMeth2 __attribute__((unavailable));
7@end
8
9@implementation  I  // expected-warning {{method definition for 'Meth' not found}}
10@end
11
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@end
15
16#pragma GCC diagnostic ignored "-Wincomplete-implementation"
17@interface I2
18- Meth; // expected-note{{method 'Meth' declared here}}
19@end
20
21@implementation  I2
22@end
23
24@implementation I2(CAT)
25- Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
26@end
27
28@interface Q
29@end
30
31// rdar://10336158
32@implementation Q
33
34__attribute__((visibility("default")))
35@interface QN // expected-error {{Objective-C declarations may only appear in global scope}}
36{
37}
38@end
39
40@end
41
42