• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GlobalSplit used to lose type metadata for classes with virtual bases but no virtual methods.
2 // RUN: %clangxx_cfi -o %t1 %s && %run %t1
3 
4 // UNSUPPORTED: windows-msvc
5 
6 struct Z {
7 };
8 
9 struct ZZ : public virtual Z {
10 };
11 
12 struct A : public ZZ {
13 };
14 
15 struct B : public A {
16 };
17 
main()18 int main() {
19   A* a = new B();
20   B *b = (B*)a;
21 }
22