1// RUN: %clang_cc1 -fsyntax-only -verify %s 2 3extern void foo(); 4 5@protocol MyProtocol @end 6 7@interface MyClass @end 8 9int main() 10{ 11 MyClass <MyProtocol> *obj_p; 12 MyClass *obj_cp; 13 14 obj_cp = obj_p; 15 obj_p = obj_cp; // expected-warning {{incompatible pointer types assigning to 'MyClass<MyProtocol> *' from 'MyClass *'}} 16 17 if (obj_cp == obj_p) 18 foo(); 19 20 if (obj_p == obj_cp) 21 foo(); 22 23} 24 25 26