brintos

brintos / llvm-project-archived public Read only

0
0
Text · 772 B · 7ada2f4 Raw
53 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4// REQUIRES: LP645 6@interface G7@end8 9@interface F10- (void)bar:(id *)objects;11- (void)foo:(G**)objects;12@end13 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// pr793627@interface I1 @end28 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