[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / microsoft-abi-nontrivial-covariant-thunk.cpp
blobcb8b5224d65b60bc06ef8dfba4490eb90badb340
1 // RUN: %clang_cc1 %s -fno-rtti -emit-llvm-only -o - -triple=i386-pc-win32 -verify
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 };
11 struct B {
12 B();
13 int b;
14 virtual B *clone(A);
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}}
23 B::B() {} // force emission
24 C::C() {} // force emission