1 | // RUN: %clang_cc1 -fms-extensions -verify %s |
2 | |
3 | // rdar://22464808 |
4 | |
5 | namespace test0 { |
6 | class A { |
7 | private: |
8 | void foo(int*); |
9 | public: |
10 | void foo(long*); |
11 | }; |
12 | class B : public A { |
13 | void test() { |
14 | __super::foo((long*) 0); |
15 | } |
16 | }; |
17 | } |
18 | |
19 | namespace test1 { |
20 | struct A { |
21 | static void foo(); // expected-note {{member is declared here}} |
22 | }; |
23 | struct B : private A { // expected-note {{constrained by private inheritance here}} |
24 | void test() { |
25 | __super::foo(); |
26 | } |
27 | }; |
28 | struct C : public B { |
29 | void test() { |
30 | __super::foo(); // expected-error {{'foo' is a private member of 'test1::A'}} |
31 | } |
32 | }; |
33 | } |
34 | |
35 | namespace test2 { |
36 | struct A { |
37 | static void foo(); |
38 | }; |
39 | struct B : public A { |
40 | void test() { |
41 | __super::foo(); |
42 | } |
43 | }; |
44 | struct C : private B { |
45 | void test() { |
46 | __super::foo(); |
47 | } |
48 | }; |
49 | } |
50 | |