Mercurial > hg > CbC > CbC_llvm
comparison clang/test/SemaObjC/interface-tu-variable.m @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // RUN: %clang_cc1 -fsyntax-only -verify %s | |
2 | |
3 @interface XX | |
4 int x; // expected-error {{cannot declare variable inside @interface or @protocol}} | |
5 int one=1; // expected-error {{cannot declare variable inside @interface or @protocol}} | |
6 @end | |
7 | |
8 @protocol PPP | |
9 int ddd; // expected-error {{cannot declare variable inside @interface or @protocol}} | |
10 @end | |
11 | |
12 @interface XX(CAT) | |
13 char * III; // expected-error {{cannot declare variable inside @interface or @protocol}} | |
14 extern int OK; | |
15 @end | |
16 | |
17 @interface XX() | |
18 char * III2; // expected-error {{cannot declare variable inside @interface or @protocol}} | |
19 extern int OK2; | |
20 @end | |
21 | |
22 | |
23 int main( int argc, const char *argv[] ) { | |
24 return x+one; | |
25 } | |
26 |