// RUN: %clang_cc1 -fsyntax-only -verify %s @interface NSObject @end @protocol XCElementP @end @protocol XCElementSpacerP @end @protocol PWhatever @end @interface XX - (void)setFlexElement:(NSObject *)flexer; - (void)setFlexElement2:(NSObject *)flexer; // expected-note{{passing argument to parameter 'flexer' here}} @end void func() { NSObject * flexer; NSObject * flexer2; XX *obj; [obj setFlexElement:flexer]; // FIXME: GCC provides the following diagnostic (which is much better): // protocol-typecheck.m:21: warning: class 'NSObject ' does not implement the 'XCElementSpacerP' protocol [obj setFlexElement2:flexer2]; // expected-warning{{incompatible pointer types sending 'NSObject *' to parameter of type 'NSObject *'}} }