// RUN: clang-cc -pedantic -fsyntax-only -verify %s @protocol MyProto1 @end @protocol MyProto2 @end @interface INTF @end id Func(INTF *p2) { return p2; } id Gunc(id p2) { return p2; } id Gunc1(id p2) { return p2; } id Gunc2(id p2) { Func(p2); // expected-warning {{incompatible type passing 'id', expected 'INTF *'}} return p2; // expected-warning {{incompatible type returning 'id', expected 'id'}} } id Gunc3(id p2) { return p2; // expected-warning {{incompatible type returning 'id', expected 'id'}} } id Gunc4(id p2) { return p2; } INTF * Hunc(id p2) { return p2; } INTF * Hunc1(id p2) { return p2; } INTF * Hunc2(id p2) { Func(p2); // expected-warning {{incompatible type passing 'id', expected 'INTF *'}} return p2; // expected-warning {{incompatible type returning 'id', expected 'INTF *'}} } INTF * Hunc3(id p2) { return p2; // expected-warning {{incompatible type returning 'id', expected 'INTF *'}} } INTF * Hunc4(id p2) { return p2; } id Iunc(id p2) { return p2; } id Iunc1(id p2) { return p2; } id Iunc2(id p2) { Iunc(p2); return p2; }