blob: cc82725b17d76925effc7354a5e7e4385099a978 [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
Fariborz Jahanian7f532532011-02-09 22:20:01 +00003struct __objcFastEnumerationState;
Chris Lattnerc199ab32009-04-12 20:42:31 +00004@implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}}
Chris Lattnercd147752009-03-29 17:27:48 +00005- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
Fariborz Jahanian41f2b322009-01-17 00:00:40 +00006{
Chris Lattnercd147752009-03-29 17:27:48 +00007 return 0;
8}
9@end
10
11
12int LOOP();
13
Chris Lattnerc199ab32009-04-12 20:42:31 +000014@implementation MyList (BasicTest)
Chris Lattnercd147752009-03-29 17:27:48 +000015- (void)compilerTestAgainst {
Chris Lattnerc199ab32009-04-12 20:42:31 +000016MyList * el;
17 for (el in @"foo")
Chris Lattnercd147752009-03-29 17:27:48 +000018 { LOOP(); }
19}
20@end
21
22
23static int test7(id keys) {
24 for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}}
Fariborz Jahanian41f2b322009-01-17 00:00:40 +000025}