// RUN: %clang_cc1 -fsyntax-only -verify %s
typedefintkern_return_t;typedef kern_return_t IOReturn;#defineKERN_SUCCESS0#definekIOReturnSuccess KERN_SUCCESSclassMyServer{public:virtual__attribute__((mig_server_routine)) IOReturn externalMethod();virtual__attribute__((mig_server_routine))voidanotherMethod();// expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
virtual__attribute__((mig_server_routine))intyetAnotherMethod();// expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
[[clang::mig_server_routine]]virtual IOReturn cppAnnotatedMethod();[[clang::mig_server_routine("arg")]]virtual IOReturn cppAnnotatedMethodWithInvalidArgs();// expected-error{{'mig_server_routine' attribute takes no arguments}}
[[clang::mig_server_routine]]virtualintcppInvalidAnnotatedMethod();// expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
};
IOReturn MyServer::externalMethod(){returnkIOReturnSuccess;}