1// RUN: %clang_cc1 -fsyntax-only -verify %s 2 3@interface G 4@end 5 6@interface F 7- (void)bar:(id *)objects; 8- (void)foo:(G**)objects; 9@end 10 11 12void a() { 13 F *b; 14 G **keys; 15 [b bar:keys]; 16 17 id *PID; 18 [b foo:PID]; 19 20} 21 22 23// pr7936 24@interface I1 @end 25 26class Wrapper { 27public: 28 operator id() const { return (id)_value; } 29 operator Class() const { return (Class)_value; } 30 operator I1*() const { return (I1*)_value; } 31 32 bool Compare(id obj) { return *this == obj; } 33 bool CompareClass(Class obj) { return *this == obj; } 34 bool CompareI1(I1* obj) { return *this == obj; } 35 36 Wrapper &operator*(); 37 Wrapper &operator[](int); 38 Wrapper& operator->*(int); 39 40private: 41 long _value; 42}; 43 44void f() { 45 Wrapper w; 46 w[0]; 47 *w; 48 w->*(0); 49} 50