diff options
Diffstat (limited to 'test/CodeGenObjC/objc2-new-gc-api-strongcast.m')
-rw-r--r-- | test/CodeGenObjC/objc2-new-gc-api-strongcast.m | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGenObjC/objc2-new-gc-api-strongcast.m b/test/CodeGenObjC/objc2-new-gc-api-strongcast.m new file mode 100644 index 000000000000..6a1aea6a7340 --- /dev/null +++ b/test/CodeGenObjC/objc2-new-gc-api-strongcast.m @@ -0,0 +1,26 @@ +// RUN: clang-cc -triple x86_64-apple-darwin10 -fblocks -fnext-runtime -fobjc-gc -emit-llvm -o %t %s && +// RUN: grep -F '@objc_assign_strongCast' %t | count 4 && +// RUN: true + +@interface DSATextSearch @end + +DSATextSearch **_uniqueIdToIdentifierArray = ((void *)0); +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 = ^{}; +} + |