blob: 943540ef1f23d88af7fa0d7bed14954dcd84c74a [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahanian41f2b322009-01-17 00:00:40 +00002
Chris Lattnercd147752009-03-29 17:27:48 +00003
4
Chris Lattnerc199ab32009-04-12 20:42:31 +00005@implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}}
Chris Lattnercd147752009-03-29 17:27:48 +00006- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
Fariborz Jahanian41f2b322009-01-17 00:00:40 +00007{
Chris Lattnercd147752009-03-29 17:27:48 +00008 return 0;
9}
10@end
11
12
13int LOOP();
14
Chris Lattnerc199ab32009-04-12 20:42:31 +000015@implementation MyList (BasicTest)
Chris Lattnercd147752009-03-29 17:27:48 +000016- (void)compilerTestAgainst {
Chris Lattnerc199ab32009-04-12 20:42:31 +000017MyList * el;
18 for (el in @"foo")
Chris Lattnercd147752009-03-29 17:27:48 +000019 { LOOP(); }
20}
21@end
22
23
24static int test7(id keys) {
25 for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}}
Fariborz Jahanian41f2b322009-01-17 00:00:40 +000026}