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