// RUN: %clang_cc1 -pedantic -fsyntax-only -verify %s @protocol MyProto1 @end @protocol MyProto2 @end @interface INTF @end INTF * Func(INTF *p2) { return p2; } INTF * Func1(INTF *p2) { return p2; } INTF * Func2(INTF *p2) { Func(p2); // expected-warning {{incompatible pointer types passing 'INTF *' to parameter of type 'INTF *'}} return p2; // expected-warning {{incompatible pointer types returning 'INTF *' from a function with result type 'INTF *'}} } INTF * Func3(INTF *p2) { return p2; // expected-warning {{incompatible pointer types returning 'INTF *' from a function with result type 'INTF *'}} } INTF * Func4(INTF *p2) { return p2; }