1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp 2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o %t %t-rw.cpp 3*f4a2713aSLionel Sambuc// radar 7987817 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambucvoid *sel_registerName(const char *); 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@interface Test { 8*f4a2713aSLionel Sambuc} 9*f4a2713aSLionel Sambuc@end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@implementation Test 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc- (void)enumerateProvidersWithBlock:(void (^)(void))block { 14*f4a2713aSLionel Sambuc block(); 15*f4a2713aSLionel Sambuc} 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc- (void)providerEnumerator { 18*f4a2713aSLionel Sambuc ^(void (^providerBlock)(void)) { 19*f4a2713aSLionel Sambuc [self enumerateProvidersWithBlock:providerBlock]; 20*f4a2713aSLionel Sambuc }; 21*f4a2713aSLionel Sambuc} 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc- (void)testNilBlock { 24*f4a2713aSLionel Sambuc [self enumerateProvidersWithBlock:0]; 25*f4a2713aSLionel Sambuc} 26*f4a2713aSLionel Sambuc 27*f4a2713aSLionel Sambuc@end 28*f4a2713aSLionel Sambuc 29*f4a2713aSLionel Sambuc 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambucint main(int argc, char *argv[]) { 32*f4a2713aSLionel Sambuc return 0; 33*f4a2713aSLionel Sambuc} 34