blob: 667c632aa5cd42d50e7816c876ef090e2e78235b [file] [log] [blame]
// RUN: clang-cc -fsyntax-only -verify %s
@interface XX
int x; // expected-error {{cannot declare variable inside a class, protocol or category}}
int one=1; // expected-error {{cannot declare variable inside a class, protocol or category}}
@end
@protocol PPP
int ddd; // expected-error {{cannot declare variable inside a class, protocol or category}}
@end
@interface XX(CAT)
char * III; // expected-error {{cannot declare variable inside a class, protocol or category}}
extern int OK;
@end
int main( int argc, const char *argv[] ) {
return x+one;
}