1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc@interface XX 4*f4a2713aSLionel Sambucint x; // expected-error {{cannot declare variable inside @interface or @protocol}} 5*f4a2713aSLionel Sambucint one=1; // expected-error {{cannot declare variable inside @interface or @protocol}} 6*f4a2713aSLionel Sambuc@end 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc@protocol PPP 9*f4a2713aSLionel Sambucint ddd; // expected-error {{cannot declare variable inside @interface or @protocol}} 10*f4a2713aSLionel Sambuc@end 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc@interface XX(CAT) 13*f4a2713aSLionel Sambuc char * III; // expected-error {{cannot declare variable inside @interface or @protocol}} 14*f4a2713aSLionel Sambuc extern int OK; 15*f4a2713aSLionel Sambuc@end 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc@interface XX() 18*f4a2713aSLionel Sambuc char * III2; // expected-error {{cannot declare variable inside @interface or @protocol}} 19*f4a2713aSLionel Sambuc extern int OK2; 20*f4a2713aSLionel Sambuc@end 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambucint main( int argc, const char *argv[] ) { 24*f4a2713aSLionel Sambuc return x+one; 25*f4a2713aSLionel Sambuc} 26*f4a2713aSLionel Sambuc 27