// RUN: // RUN: grep "_Block_object_dispose" // RUN: grep "__copy_helper_block_" // RUN: grep "__destroy_helper_block_" // RUN: grep "__Block_byref_object_copy_" // RUN: grep "__Block_byref_object_dispose_" // RUN: grep "i32 135)" // RUN: grep "_Block_object_assign" // RUN: grep "objc_read_weak" // RUN: grep "objc_assign_weak" // RUN: // RUN: grep "_Block_object_dispose" // RUN: grep "__copy_helper_block_" // RUN: grep "__destroy_helper_block_" // RUN: grep "__Block_byref_object_copy_" // RUN: grep "__Block_byref_object_dispose_" // RUN: grep "i32 135)" // RUN: grep "_Block_object_assign" // RUN: grep "objc_read_weak" // RUN: grep "objc_assign_weak"
@interface NSDictionary @end
void test1(NSDictionary * dict) {
^{ (void)dict; }();
}
@interface D
@end
void foo() {
__block __weak D *weakSelf;
D *l;
l = weakSelf;
weakSelf = l;
}
void (^__weak b)(void);
void test2() {
__block int i = 0;
b = ^ { ++i; };
}