void x(id y) {}
void y(int a) {}
extern id opaque_id(void);
void f(void) {
__weak id wid;
__block int byref_int = 0;
char ch = 'a';
char ch1 = 'b';
char ch2 = 'c';
short sh = 2;
const id bar = (id) opaque_id();
id baz = 0;
__strong id strong_void_sta;
__block id byref_bab = (id)0;
__block id bl_var1;
int i; double dob;
void (^b)(void) = ^{
byref_int = sh + ch+ch1+ch2 ;
x(bar);
x(baz);
x((id)strong_void_sta);
x(byref_bab);
};
b();
void (^c)(void) = ^{
byref_int = sh + ch+ch1+ch2 ;
x(bar);
x(baz);
x((id)strong_void_sta);
x(wid);
bl_var1 = 0;
x(byref_bab);
};
}
@class NSString, NSNumber;
void g(void) {
NSString *foo;
NSNumber *bar;
unsigned int bletch;
__weak id weak_delegate;
unsigned int i;
NSString *y;
NSString *z;
void (^c)(void) = ^{
int j = i + bletch;
x(foo);
x(bar);
x(weak_delegate);
x(y);
x(z);
};
c();
}
void h(void) {
struct S5 {
int i1;
__unsafe_unretained id o1;
struct V {
int i2;
__unsafe_unretained id o2;
} v1;
int i3;
union UI {
void * i1;
__unsafe_unretained id o1;
int i3;
__unsafe_unretained id o3;
}ui;
};
union U {
void * i1;
__unsafe_unretained id o1;
int i3;
__unsafe_unretained id o3;
}ui;
struct S5 s2;
union U u2;
__block id block_id;
void (^c)(void) = ^{
x(s2.ui.o1);
x(u2.o1);
block_id = 0;
};
c();
}
void arr1(void) {
struct S {
__unsafe_unretained id unsafe_unretained_var[4];
} imported_s;
void (^c)(void) = ^{
x(imported_s.unsafe_unretained_var[2]);
};
c();
}
void arr2(void) {
struct S {
int a;
__unsafe_unretained id unsafe_unretained_var[4];
} imported_s;
void (^c)(void) = ^{
x(imported_s.unsafe_unretained_var[2]);
};
c();
}
void arr3(void) {
struct S {
int a;
__unsafe_unretained id unsafe_unretained_var[0];
} imported_s;
void (^c)(void) = ^{
int i = imported_s.a;
};
c();
}
@class B;
void arr4(void) {
struct S {
struct s0 {
__unsafe_unretained id s_f0;
__unsafe_unretained id s_f1;
} f0;
__unsafe_unretained id f1;
struct s1 {
int *f0;
__unsafe_unretained B *f1;
} f4[2][2];
} captured_s;
void (^c)(void) = ^{
id i = captured_s.f0.s_f1;
};
c();
}
void bf1(void) {
struct S {
int flag : 25;
int flag1: 7;
int flag2 :1;
int flag3: 7;
int flag4: 24;
} s;
int (^c)(void) = ^{
return s.flag;
};
c();
}
void bf2(void) {
struct S {
int flag : 1;
} s;
int (^c)(void) = ^{
return s.flag;
};
c();
}
void bf3(void) {
struct {
unsigned short _reserved : 16;
unsigned char _draggedNodesAreDeletable: 1;
unsigned char _draggedOutsideOutlineView : 1;
unsigned char _adapterRespondsTo_addRootPaths : 1;
unsigned char _adapterRespondsTo_moveDataNodes : 1;
unsigned char _adapterRespondsTo_removeRootDataNode : 1;
unsigned char _adapterRespondsTo_doubleClickDataNode : 1;
unsigned char _adapterRespondsTo_selectDataNode : 1;
unsigned char _adapterRespondsTo_textDidEndEditing : 1;
unsigned char _adapterRespondsTo_updateAndSaveRoots : 1;
unsigned char _adapterRespondsTo_askToDeleteRootNodes : 1;
unsigned char _adapterRespondsTo_contextMenuForSelectedNodes : 1;
unsigned char _adapterRespondsTo_pasteboardFilenamesForNodes : 1;
unsigned char _adapterRespondsTo_writeItemsToPasteboard : 1;
unsigned char _adapterRespondsTo_writeItemsToPasteboardXXXX : 1;
unsigned int _filler : 32;
} _flags;
unsigned char (^c)(void) = ^{
return _flags._draggedNodesAreDeletable;
};
c();
}
void bf4(void) {
struct {
unsigned short _reserved : 16;
unsigned char _draggedNodesAreDeletable: 1;
unsigned char _draggedOutsideOutlineView : 1;
unsigned char _adapterRespondsTo_addRootPaths : 1;
unsigned char _adapterRespondsTo_moveDataNodes : 1;
unsigned char _adapterRespondsTo_removeRootDataNode : 1;
unsigned char _adapterRespondsTo_doubleClickDataNode : 1;
unsigned char _adapterRespondsTo_selectDataNode : 1;
unsigned char _adapterRespondsTo_textDidEndEditing : 1;
unsigned long long : 64;
unsigned char _adapterRespondsTo_updateAndSaveRoots : 1;
unsigned char _adapterRespondsTo_askToDeleteRootNodes : 1;
unsigned char _adapterRespondsTo_contextMenuForSelectedNodes : 1;
unsigned char _adapterRespondsTo_pasteboardFilenamesForNodes : 1;
unsigned char _adapterRespondsTo_writeItemsToPasteboard : 1;
unsigned char _adapterRespondsTo_writeItemsToPasteboardXXXX : 1;
unsigned int _filler : 32;
} _flags;
unsigned char (^c)(void) = ^{
return _flags._draggedNodesAreDeletable;
};
c();
}
void bf5(void) {
struct {
unsigned char flag : 1;
unsigned int : 32;
unsigned char flag1 : 1;
} _flags;
unsigned char (^c)(void) = ^{
return _flags.flag;
};
c();
}
void bf6(void) {
struct {
unsigned char flag : 1;
unsigned int : 0;
unsigned char flag1 : 1;
} _flags;
unsigned char (^c)(void) = ^{
return _flags.flag;
};
c();
}
void Test7(void) {
__weak id wid;
__weak id wid1, wid2, wid3, wid4;
__weak id wid5, wid6, wid7, wid8;
__weak id wid9, wid10, wid11, wid12;
__weak id wid13, wid14, wid15, wid16;
const id bar = (id) opaque_id();
void (^b)(void) = ^{
x(bar);
x(wid1);
x(wid2);
x(wid3);
x(wid4);
x(wid5);
x(wid6);
x(wid7);
x(wid8);
x(wid9);
x(wid10);
x(wid11);
x(wid12);
x(wid13);
x(wid14);
x(wid15);
x(wid16);
};
}
void Test8(void) {
__weak id wid;
__weak id wid1, wid2, wid3, wid4;
__weak id wid5, wid6, wid7, wid8;
__weak id wid9, wid10, wid11, wid12;
__weak id wid13, wid14, wid15, wid16;
__weak id w1, w2, w3, w4;
__weak id w5, w6, w7, w8;
__weak id w9, w10, w11, w12;
__weak id w13, w14, w15, w16;
const id bar = (id) opaque_id();
void (^b)(void) = ^{
x(bar);
x(wid1);
x(wid2);
x(wid3);
x(wid4);
x(wid5);
x(wid6);
x(wid7);
x(wid8);
x(wid9);
x(wid10);
x(wid11);
x(wid12);
x(wid13);
x(wid14);
x(wid15);
x(wid16);
x(w1);
x(w2);
x(w3);
x(w4);
x(w5);
x(w6);
x(w7);
x(w8);
x(w9);
x(w10);
x(w11);
x(w12);
x(w13);
x(w14);
x(w15);
x(w16);
x(wid);
};
}