1 // RUN: %clang_cc1 -std=c++2a -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
2 
3 #include "Inputs/std-compare.h"
4 
5 // CHECK: @_ZTV1A =
6 struct A;
7 struct X {
8   // CHECK-SAME: @_ZN1X1xEv
9   virtual void x();
10   friend auto operator<=>(X, X) = default;
11 };
12 struct Y {
13   virtual ~Y();
14   virtual A &operator=(const A &);
15   friend auto operator<=>(Y, Y) = default;
16 };
17 struct A : X, Y {
18   // CHECK-SAME: @_ZN1A1fEv
19   virtual void f();
20   // CHECK-SAME: @_ZNKR1AssERKS_
21   virtual std::strong_ordering operator<=>(const A &) const & = default;
22   // CHECK-SAME: @_ZN1A1gEv
23   virtual void g();
24   // CHECK-SAME: @_ZNKO1AssERKS_
25   virtual std::strong_ordering operator<=>(const A &) const && = default;
26   // CHECK-SAME: @_ZN1A1hEv
27   virtual void h();
28 
29   // CHECK-SAME: @_ZN1AaSERKS_
30   // implicit virtual A &operator=(const A&) = default;
31 
32   // CHECK-SAME: @_ZN1AD1Ev
33   // CHECK-SAME: @_ZN1AD0Ev
34   // implicit virtual ~A();
35 
36   // CHECK-SAME: @_ZNKR1AeqERKS_
37   // implicit virtual A &operator==(const A&) const & = default;
38 
39   // CHECK-SAME: @_ZNKO1AeqERKS_
40   // implicit virtual A &operator==(const A&) const && = default;
41 };
42 
43 // For Y:
44 // CHECK-SAME: @_ZTI1A
45 
46 // CHECK-SAME: @_ZThn{{[0-9]*}}_N1AD1Ev
47 // CHECK-SAME: @_ZThn{{[0-9]*}}_N1AD0Ev
48 // virtual ~Y();
49 
50 // CHECK-SAME: @_ZThn{{[0-9]*}}_N1AaSERKS_
51 // virtual A &operator=(const A &);
52 
f()53 void A::f() {}
54