1*67e74705SXin Li// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify -fblocks -triple x86_64-apple-darwin10.0.0 %s 2*67e74705SXin Li// rdar://10187884 3*67e74705SXin Li 4*67e74705SXin Litypedef void (^blk)(id arg1, __attribute((ns_consumed)) id arg2); 5*67e74705SXin Litypedef void (^blk1)(__attribute((ns_consumed))id arg1, __attribute((ns_consumed)) id arg2); 6*67e74705SXin Liblk a = ^void (__attribute((ns_consumed)) id arg1, __attribute((ns_consumed)) id arg2){}; // expected-error {{incompatible block pointer types initializing}} 7*67e74705SXin Li 8*67e74705SXin Liblk b = ^void (id arg1, __attribute((ns_consumed)) id arg2){}; 9*67e74705SXin Li 10*67e74705SXin Liblk c = ^void (__attribute((ns_consumed)) id arg1, __attribute((ns_consumed)) id arg2){}; // expected-error {{incompatible block pointer types initializing}} 11*67e74705SXin Li 12*67e74705SXin Liblk d = ^void (id arg1, id arg2) {}; // expected-error {{incompatible block pointer types initializing}} 13*67e74705SXin Li 14*67e74705SXin Liblk1 a1 = ^void (__attribute((ns_consumed)) id arg1, id arg2){}; // expected-error {{incompatible block pointer types initializing}} 15*67e74705SXin Li 16*67e74705SXin Liblk1 b2 = ^void (id arg1, __attribute((ns_consumed)) id arg2){}; // expected-error {{incompatible block pointer types initializing}} 17*67e74705SXin Li 18*67e74705SXin Liblk1 c3 = ^void (__attribute((ns_consumed)) id arg1, __attribute((ns_consumed)) id arg2){}; 19*67e74705SXin Li 20*67e74705SXin Liblk1 d4 = ^void (id arg1, id arg2) {}; // expected-error {{incompatible block pointer types initializing}} 21