1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp 2*f4a2713aSLionel Sambuc// 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*f4a2713aSLionel Sambuc// rdar://15143875 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc@class NSData, NSError; 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@interface Foo 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuctypedef void (^Callback)(NSData *data, NSError *error); 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc- (void)doSomething:(NSData *)data callback:(Callback)callback; 12*f4a2713aSLionel Sambuc@end 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc@implementation Foo 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc- (void)doSomething:(NSData *)data callback:(Callback)callback { 17*f4a2713aSLionel Sambuc callback(0, 0); 18*f4a2713aSLionel Sambuc} 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@end 21