| 1 |
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 %s -fsyntax-only -verify |
| 2 |
|
| 3 |
@interface NSWhatever : |
| 4 |
NSObject // expected-error {{cannot find interface declaration for 'NSObject'}} |
| 5 |
<NSCopying> // expected-error {{no type or protocol named 'NSCopying'}} |
| 6 |
@end |
| 7 |
|
| 8 |
@interface A |
| 9 |
{ |
| 10 |
int x |
| 11 |
} // expected-error {{expected ';' at end of declaration list}} |
| 12 |
@end |
| 13 |
|
| 14 |
@interface INT1 |
| 15 |
@end |
| 16 |
|
| 17 |
void test2(void) { |
| 18 |
INT1 b[3]; // expected-error {{array of interface 'INT1' is invalid (probably should be an array of pointers)}} |
| 19 |
INT1 *c = &b[0]; |
| 20 |
++c; |
| 21 |
} |
| 22 |
|
| 23 |
@interface FOO // expected-note {{previous definition is here}} |
| 24 |
- (void)method; |
| 25 |
@end |
| 26 |
|
| 27 |
@interface FOO // expected-error {{duplicate interface definition for class 'FOO'}} |
| 28 |
- (void)method2; |
| 29 |
@end |
| 30 |
|