blob: e6e3ccf12d1a5cde80bd94e3f94d6ac408d99e74 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Fariborz Jahanian41f2b322009-01-17 00:00:40 +00002
Chris Lattnercd147752009-03-29 17:27:48 +00003ce MyList // expected-error {{invalid token after top level declarator}}
4@end
5
6
7@implementation MyList
8- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
Fariborz Jahanian41f2b322009-01-17 00:00:40 +00009{
Chris Lattnercd147752009-03-29 17:27:48 +000010 return 0;
11}
12@end
13
14
15int LOOP();
16
17@implementation MyList (BasicTest) // expected-error {{cannot find interface declaration for 'MyList'}}
18- (void)compilerTestAgainst {
19MyList * el; // expected-error {{use of undeclared identifier 'MyList'}}
20 for (el in @"foo") // expected-error {{use of undeclared identifier 'el'}}
21 { LOOP(); }
22}
23@end
24
25
26static int test7(id keys) {
27 for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}}
Fariborz Jahanian41f2b322009-01-17 00:00:40 +000028}