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