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 | |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 3 | |
| 4 | |
Chris Lattner | c199ab3 | 2009-04-12 20:42:31 +0000 | [diff] [blame] | 5 | @implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}} |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 6 | - (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] | 7 | { |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 8 | return 0; |
| 9 | } |
| 10 | @end |
| 11 | |
| 12 | |
| 13 | int LOOP(); |
| 14 | |
Chris Lattner | c199ab3 | 2009-04-12 20:42:31 +0000 | [diff] [blame] | 15 | @implementation MyList (BasicTest) |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 16 | - (void)compilerTestAgainst { |
Chris Lattner | c199ab3 | 2009-04-12 20:42:31 +0000 | [diff] [blame] | 17 | MyList * el; |
| 18 | for (el in @"foo") |
Chris Lattner | cd14775 | 2009-03-29 17:27:48 +0000 | [diff] [blame] | 19 | { LOOP(); } |
| 20 | } |
| 21 | @end |
| 22 | |
| 23 | |
| 24 | static int test7(id keys) { |
| 25 | for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}} |
Fariborz Jahanian | 41f2b32 | 2009-01-17 00:00:40 +0000 | [diff] [blame] | 26 | } |