Steve Naroff | b29b427 | 2008-04-14 22:03:09 +0000 | [diff] [blame] | 1 | // RUN: clang -rewrite-objc %s -o=- |
Fariborz Jahanian | 88f50f3 | 2008-01-09 18:15:42 +0000 | [diff] [blame] | 2 | |
| 3 | @protocol P @end |
| 4 | |
| 5 | @interface MyList |
| 6 | @end |
| 7 | |
| 8 | @implementation MyList |
| 9 | - (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount |
| 10 | { |
| 11 | return 0; |
| 12 | } |
| 13 | @end |
| 14 | |
| 15 | @interface MyList (BasicTest) |
| 16 | - (void)compilerTestAgainst; |
| 17 | @end |
| 18 | |
| 19 | int LOOP(); |
| 20 | @implementation MyList (BasicTest) |
| 21 | - (void)compilerTestAgainst { |
| 22 | MyList * el; |
| 23 | for (el in self) |
| 24 | { LOOP(); } |
| 25 | for (MyList * el1 in self) |
| 26 | LOOP(); |
| 27 | } |
| 28 | @end |
| 29 | |