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