blob: 16a7ea8e3dc39d712af52ae35a4a8a7aeb2ae324 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Fariborz Jahanian20552d22008-01-10 20:33:58 +00002
Chris Lattner51a75d02009-02-27 17:15:01 +00003ce MyList // expected-error {{invalid token after top level declarator}}
Fariborz Jahanian20552d22008-01-10 20:33:58 +00004@end
5
6
7@implementation MyList
8- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
9{
10 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'}}
Chris Lattner13fd7e52008-06-21 21:44:18 +000020 for (el in @"foo") // expected-error {{use of undeclared identifier 'el'}}
Fariborz Jahanian20552d22008-01-10 20:33:58 +000021 { LOOP(); }
22}
23@end
24