Daniel Dunbar | c5a97ec | 2009-11-17 07:07:28 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -triple x86_64-apple-darwin10 -fblocks -fobjc-gc -emit-llvm -o %t %s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 2 | // RUN: grep -F '@objc_assign_strongCast' %t | count 4 |
Fariborz Jahanian | fd02ed7 | 2009-09-21 18:54:29 +0000 | [diff] [blame] | 3 | |
| 4 | @interface DSATextSearch @end |
| 5 | |
| 6 | DSATextSearch **_uniqueIdToIdentifierArray = ((void *)0); |
| 7 | void foo (int _nextId) |
| 8 | { |
| 9 | _uniqueIdToIdentifierArray[_nextId] = 0; // objc_assign_strongCast |
| 10 | } |
| 11 | |
| 12 | typedef struct { |
| 13 | unsigned long state; |
| 14 | id *itemsPtr; |
| 15 | void (^bp)(); |
| 16 | unsigned long *mutationsPtr; |
| 17 | unsigned long extra[5]; |
| 18 | } NSFastEnumerationState; |
| 19 | |
| 20 | void foo1 (NSFastEnumerationState * state) |
| 21 | { |
| 22 | state->itemsPtr = 0; |
| 23 | state->bp = ^{}; |
| 24 | } |
| 25 | |