1 // RUN: %clang_cc1 %s -emit-llvm-only -triple=i386-pc-win32 -verify -DTEST1
2 // RUN: %clang_cc1 %s -emit-llvm-only -triple=i386-pc-win32 -verify -DTEST2
6 virtual A
*foo(); // in vftable slot #0.
7 virtual A
*bar(); // in vftable slot #1.
10 struct B
: virtual A
{
11 // appended to the A subobject's vftable in slot #2.
12 virtual B
*foo(); // expected-note{{covariant thunk required by 'foo'}}
15 struct C
: virtual A
{
16 // appended to the A subobject's vftable in slot #2.
17 virtual C
*bar(); // expected-note{{covariant thunk required by 'bar'}}
20 struct D
: B
, C
{ D(); }; // expected-error{{ambiguous vftable component}}
26 virtual A
*foo(); // in vftable slot #0
29 struct B
: virtual A
{
30 // appended to the A subobject's vftable in slot #1.
31 virtual B
*foo(); // expected-note{{covariant thunk required by 'foo'}}
34 struct C
: virtual A
{
35 // appended to the A subobject's vftable in slot #1.
36 virtual C
*foo(); // expected-note{{covariant thunk required by 'foo'}}
39 struct D
: B
, C
{ // expected-error{{ambiguous vftable component}}