blob: 977dccc88b1d2368eaac18cf749e46d3a21ad10a [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 +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}