1 // RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
3 typedef int kern_return_t;
10 - (kern_return_t)foo __attribute__((mig_server_routine)); // no-warning
11 - (void) bar_void __attribute__((mig_server_routine)); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
12 - (int) bar_int __attribute__((mig_server_routine)); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
16 - (kern_return_t)foo {
17 kern_return_t (^block)(void) = ^ __attribute__((mig_server_routine)) { // no-warning
21 // FIXME: Warn that this block doesn't return a kern_return_t.
22 void (^invalid_block)(void) = ^ __attribute__((mig_server_routine)) {};