[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / microsoft-super.cpp
blob006d37356f691f570406199c51f3d25814446e43
1 // RUN: %clang_cc1 -fms-extensions -verify %s
3 namespace test0 {
4 class A {
5 private:
6 void foo(int*);
7 public:
8 void foo(long*);
9 };
10 class B : public A {
11 void test() {
12 __super::foo((long*) 0);
17 namespace test1 {
18 struct A {
19 static void foo(); // expected-note {{member is declared here}}
21 struct B : private A { // expected-note {{constrained by private inheritance here}}
22 void test() {
23 __super::foo();
26 struct C : public B {
27 void test() {
28 __super::foo(); // expected-error {{'foo' is a private member of 'test1::A'}}
33 namespace test2 {
34 struct A {
35 static void foo();
37 struct B : public A {
38 void test() {
39 __super::foo();
42 struct C : private B {
43 void test() {
44 __super::foo();