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