| John McCall | 9b0a7ce | 2011-10-02 01:16:38 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-fragile-abi -fblocks -fobjc-gc -emit-llvm -o %t %s |
| Daniel Dunbar | 8b57697 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 2 | // RUN: grep -F '@objc_assign_strongCast' %t | count 4 |
| John McCall | 9b0a7ce | 2011-10-02 01:16:38 +0000 | [diff] [blame^] | 3 | // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-fragile-abi -fblocks -fobjc-gc -emit-llvm -o %t %s |
| Fariborz Jahanian | c21ba96 | 2010-05-20 18:22:28 +0000 | [diff] [blame] | 4 | // RUN: grep -F '@objc_assign_strongCast' %t | count 4 |
| Fariborz Jahanian | 38c3ae9 | 2009-09-21 18:54:29 +0000 | [diff] [blame] | 5 | |
| 6 | @interface DSATextSearch @end |
| 7 | |
| Fariborz Jahanian | c21ba96 | 2010-05-20 18:22:28 +0000 | [diff] [blame] | 8 | DSATextSearch **_uniqueIdToIdentifierArray = (0); |
| Fariborz Jahanian | 38c3ae9 | 2009-09-21 18:54:29 +0000 | [diff] [blame] | 9 | void foo (int _nextId) |
| 10 | { |
| 11 | _uniqueIdToIdentifierArray[_nextId] = 0; // objc_assign_strongCast |
| 12 | } |
| 13 | |
| 14 | typedef struct { |
| 15 | unsigned long state; |
| 16 | id *itemsPtr; |
| 17 | void (^bp)(); |
| 18 | unsigned long *mutationsPtr; |
| 19 | unsigned long extra[5]; |
| 20 | } NSFastEnumerationState; |
| 21 | |
| 22 | void foo1 (NSFastEnumerationState * state) |
| 23 | { |
| 24 | state->itemsPtr = 0; |
| 25 | state->bp = ^{}; |
| 26 | } |
| 27 | |