[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / microsoft-super.cpp
blobbfa9d17dbc21766572c06badf2e8a2604ce91ca2
1 // RUN: %clang_cc1 -fms-extensions -verify %s
3 // rdar://22464808
5 namespace test0 {
6 class A {
7 private:
8 void foo(int*);
9 public:
10 void foo(long*);
12 class B : public A {
13 void test() {
14 __super::foo((long*) 0);
19 namespace test1 {
20 struct A {
21 static void foo(); // expected-note {{member is declared here}}
23 struct B : private A { // expected-note {{constrained by private inheritance here}}
24 void test() {
25 __super::foo();
28 struct C : public B {
29 void test() {
30 __super::foo(); // expected-error {{'foo' is a private member of 'test1::A'}}
35 namespace test2 {
36 struct A {
37 static void foo();
39 struct B : public A {
40 void test() {
41 __super::foo();
44 struct C : private B {
45 void test() {
46 __super::foo();