1 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp 2 // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp 3 // rdar://15143875 4 5 @class NSData, NSError; 6 7 @interface Foo 8 9 typedef void (^Callback)(NSData *data, NSError *error); 10 11 - (void)doSomething:(NSData *)data callback:(Callback)callback; 12 @end 13 14 @implementation Foo 15 16 - (void)doSomething:(NSData *)data callback:(Callback)callback { 17 callback(0, 0); 18 } 19 20 @end 21