Douglas Gregor | 81b747b | 2009-09-17 21:32:03 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -code-completion-dump=1 %s -o - | FileCheck -check-prefix=CC1 %s && |
| 2 | // RUN: true |
| 3 | |
| 4 | struct Base1 { |
| 5 | int member1; |
| 6 | float member2; |
| 7 | }; |
| 8 | |
| 9 | struct Base2 { |
| 10 | int member1; |
| 11 | double member3; |
| 12 | void memfun1(int); |
| 13 | }; |
| 14 | |
| 15 | struct Base3 : Base1, Base2 { |
| 16 | void memfun1(float); |
| 17 | void memfun1(double); |
| 18 | void memfun2(int); |
| 19 | }; |
| 20 | |
| 21 | struct Derived : Base3 { |
| 22 | int member4; |
| 23 | int memfun3(int); |
| 24 | }; |
| 25 | |
| 26 | class Proxy { |
| 27 | public: |
| 28 | Derived *operator->() const; |
| 29 | }; |
| 30 | |
| 31 | void test(const Proxy &p) { |
| 32 | // CHECK-CC1: member4 : 0 |
| 33 | // CHECK-CC1: memfun3 : 0 |
| 34 | // CHECK-CC1: memfun1 : 1 |
| 35 | // CHECK-CC1: memfun1 : 1 |
| 36 | // CHECK-CC1: memfun2 : 1 |
| 37 | // CHECK-CC1: member1 : 2 |
| 38 | // CHECK-CC1: member1 : 2 |
| 39 | // CHECK-CC1: member2 : 2 |
| 40 | // CHECK-CC1: member3 : 2 |
| 41 | // CHECK-CC1: memfun1 : 2 (Hidden) |
| 42 | p-> |