// RUN: %clang_cc1 -pedantic -fsyntax-only -verify %s @protocol MyProto1 @end @protocol MyProto2 @end @interface INTF @end id Func(INTF *p2) // expected-note 2{{passing argument to parameter 'p2' here}} { return p2; } id Gunc(id p2) { return p2; } id Gunc1(id p2) { return p2; } id Gunc2(id p2) { Func(p2); // expected-warning {{passing 'id' to parameter of incompatible type 'INTF *'}} return p2; // expected-warning {{returning 'id' from a function with incompatible result type 'id'}} } id Gunc3(id p2) { return p2; // expected-warning {{returning 'id' from a function with incompatible result type '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 {{passing 'id' to parameter of incompatible type 'INTF *'}} return p2; // expected-warning {{returning 'id' from a function with incompatible result type 'INTF *'}} } INTF * Hunc3(id p2) { return p2; // expected-warning {{returning 'id' from a function with incompatible result type '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; }