[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / cxx2a-virtual-base-used.cpp
blob871c671f1d437724bbd9f91e34a8b1613d72c6be
1 // RUN: %clang_cc1 -std=c++2a -verify -triple=x86_64-linux-gnu %s
2 // expected-no-diagnostics
4 // Fixes assertion triggered by https://github.com/llvm/llvm-project/issues/65982
6 struct A { int y; };
7 struct B : virtual public A {};
8 struct X : public B {};
10 void member_with_virtual_inheritance() {
11 X x;
12 x.B::y = 1;