blob: 667c632aa5cd42d50e7816c876ef090e2e78235b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// 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;
}
|