3 // DO NOT include anything else here
5 // DO NOT include anything else here
12 #if !__has_feature(objc_arc)
15 id __unsafe_unretained u
;
16 #if __has_feature(objc_arc_weak)
20 void fn(void) __unused
;
22 id __autoreleasing a __unused
;
25 // check type inference for blocks returning YES and NO (rdar://10118972)
26 BOOL (^block1
)(void) = ^{ return YES
; };
27 BOOL (^block2
)(void) = ^{ return NO
; };
36 testwarn("rdar://12371870 -Wnull-conversion");
37 testassert(!(bool)nil
);
38 testassert(!(bool)Nil
);
44 #if __has_feature(objc_bool)
45 // YES[array] is disallowed for objc just as true[array] is for C++
47 // this will fail if YES and NO do not have enough parentheses
48 int array
[2] = { 888, 999 };
49 testassert(NO
[array
] == 888);
50 testassert(YES
[array
] == 999);