2012-06-20 14:18:46 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fblocks -fobjc-gc -emit-llvm -o %t %s
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: grep -F '@objc_assign_strongCast' %t | count 4
|
2012-06-20 14:18:46 +08:00
|
|
|
// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fblocks -fobjc-gc -emit-llvm -o %t %s
|
2010-05-21 02:22:28 +08:00
|
|
|
// RUN: grep -F '@objc_assign_strongCast' %t | count 4
|
2009-09-22 02:54:29 +08:00
|
|
|
|
|
|
|
@interface DSATextSearch @end
|
|
|
|
|
2010-05-21 02:22:28 +08:00
|
|
|
DSATextSearch **_uniqueIdToIdentifierArray = (0);
|
2009-09-22 02:54:29 +08:00
|
|
|
void foo (int _nextId)
|
|
|
|
{
|
|
|
|
_uniqueIdToIdentifierArray[_nextId] = 0; // objc_assign_strongCast
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
unsigned long state;
|
|
|
|
id *itemsPtr;
|
|
|
|
void (^bp)();
|
|
|
|
unsigned long *mutationsPtr;
|
|
|
|
unsigned long extra[5];
|
|
|
|
} NSFastEnumerationState;
|
|
|
|
|
|
|
|
void foo1 (NSFastEnumerationState * state)
|
|
|
|
{
|
|
|
|
state->itemsPtr = 0;
|
|
|
|
state->bp = ^{};
|
|
|
|
}
|
|
|
|
|