Shih-wei Liao | f8fd82b | 2010-02-10 11:10:31 -0800 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | |
| 4 | |
| 5 | @implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}} |
| 6 | - (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount |
| 7 | { |
| 8 | return 0; |
| 9 | } |
| 10 | @end |
| 11 | |
| 12 | |
| 13 | int LOOP(); |
| 14 | |
| 15 | @implementation MyList (BasicTest) |
| 16 | - (void)compilerTestAgainst { |
| 17 | MyList * el; |
| 18 | for (el in @"foo") |
| 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'}} |
| 26 | } |