2009-05-19 19:12:40 +08:00
|
|
|
// RUN: clang-cc -triple i386-apple-darwin9 %s -fsyntax-only -verify
|
2008-07-21 15:06:49 +08:00
|
|
|
// rdar://5957506
|
|
|
|
|
|
|
|
@interface NSWhatever :
|
|
|
|
NSObject // expected-error {{cannot find interface declaration for 'NSObject'}}
|
2008-07-26 11:40:25 +08:00
|
|
|
<NSCopying> // expected-error {{cannot find protocol declaration for 'NSCopying'}}
|
2008-07-21 15:06:49 +08:00
|
|
|
@end
|
|
|
|
|
2008-07-26 03:54:55 +08:00
|
|
|
|
|
|
|
// rdar://6095245
|
|
|
|
@interface A
|
|
|
|
{
|
|
|
|
int x
|
|
|
|
} // expected-error {{expected ';' at end of declaration list}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2008-08-19 06:49:54 +08:00
|
|
|
// rdar://4304469
|
|
|
|
@interface INT1
|
|
|
|
@end
|
|
|
|
|
|
|
|
void test2() {
|
2009-04-27 09:55:56 +08:00
|
|
|
// rdar://6827200
|
|
|
|
INT1 b[3]; // expected-error {{array of interface 'INT1' is invalid (probably should be an array of pointers)}}
|
2008-08-19 06:49:54 +08:00
|
|
|
INT1 *c = &b[0];
|
|
|
|
++c;
|
|
|
|
}
|
|
|
|
|
2009-02-24 06:00:08 +08:00
|
|
|
|
|
|
|
// rdar://6611778
|
|
|
|
@interface FOO // expected-note {{previous definition is here}}
|
|
|
|
- (void)method;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface FOO // expected-error {{duplicate interface definition for class 'FOO'}}
|
|
|
|
- (void)method2;
|
|
|
|
@end
|
|
|
|
|