Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 41f2b32 | 2009-01-17 00:00:40 +0000 | [diff] [blame] | 2 | |
Fariborz Jahanian | 7f53253 | 2011-02-09 22:20:01 +0000 | [diff] [blame] | 3 | struct __objcFastEnumerationState; |
Chris Lattner | c199ab3 | 2009-04-12 20:42:31 +0000 | [diff] [blame] | 4 | @implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}} |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 5 | - (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount |
Fariborz Jahanian | 41f2b32 | 2009-01-17 00:00:40 +0000 | [diff] [blame] | 6 | { |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 7 | return 0; |
| 8 | } |
| 9 | @end |
| 10 | |
| 11 | |
| 12 | int LOOP(); |
| 13 | |
Chris Lattner | c199ab3 | 2009-04-12 20:42:31 +0000 | [diff] [blame] | 14 | @implementation MyList (BasicTest) |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 15 | - (void)compilerTestAgainst { |
Chris Lattner | c199ab3 | 2009-04-12 20:42:31 +0000 | [diff] [blame] | 16 | MyList * el; |
| 17 | for (el in @"foo") |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 18 | { LOOP(); } |
| 19 | } |
| 20 | @end |
| 21 | |
| 22 | |
| 23 | static int test7(id keys) { |
| 24 | for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}} |
Fariborz Jahanian | 41f2b32 | 2009-01-17 00:00:40 +0000 | [diff] [blame] | 25 | } |