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