1 | // RUN: %clang_cc1 %s -fno-rtti -emit-llvm-only -o - -triple=i386-pc-win32 -verify |
2 | |
3 | // A is not trivially copyable and must be passed indirectly or with inalloca. |
4 | struct A { |
5 | A(); |
6 | A(const A &o); |
7 | virtual ~A(); |
8 | int a; |
9 | }; |
10 | |
11 | struct B { |
12 | B(); |
13 | int b; |
14 | virtual B *clone(A); |
15 | }; |
16 | |
17 | // Converting from C* to B* requires a this adjustment. |
18 | struct C : A, B { |
19 | C(); |
20 | int c; |
21 | virtual C *clone(A); // expected-error {{cannot compile this non-trivial argument copy for return-adjusting thunk yet}} |
22 | }; |
23 | B::B() {} // force emission |
24 | C::C() {} // force emission |
25 | |