Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -rewrite-objc %s -o=- |
Fariborz Jahanian | 7571228 | 2008-01-10 00:24:29 +0000 | [diff] [blame] | 2 | |
| 3 | @interface MyList |
| 4 | - (id) allKeys; |
| 5 | @end |
| 6 | |
| 7 | @implementation MyList |
| 8 | - (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount |
| 9 | { |
| 10 | return 0; |
| 11 | } |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 12 | - (id) allKeys { return 0; } |
Fariborz Jahanian | 7571228 | 2008-01-10 00:24:29 +0000 | [diff] [blame] | 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 [el allKeys]) { LOOP(); |
| 24 | } |
| 25 | |
| 26 | for (id el1 in[el allKeys]) { LOOP(); |
| 27 | } |
| 28 | for (el in([el allKeys])) { LOOP(); |
| 29 | } |
| 30 | } |
| 31 | @end |
| 32 | |