25 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc-only -fblocks -emit-llvm -o - %s | FileCheck %s2 3@interface Test {4@package5 Test ** __strong objects;6}7@end8 9id newObject(void);10void runWithBlock(void(^)(int i));11 12@implementation Test13 14- (void)testWithObjectInBlock {15 Test **children = objects;16 runWithBlock(^(int i){17 children[i] = newObject();18 });19}20 21@end22// CHECK: call ptr @objc_assign_strongCast23// CHECK: call ptr @objc_assign_strongCast24 25