[Flang] remove whole-archive option for AIX linker (#76039)
[llvm-project.git] / clang / test / CXX / special / class.copy / p8-cxx11.cpp
blob4a9f3f2113dfb4a6a58d5417f2f6f67bbaf39d0c
1 // RUN: %clang_cc1 -std=c++11 %s -verify
2 // expected-no-diagnostics
4 // C++98 [class.copy]p5 / C++11 [class.copy]p8.
6 // The implicitly-declared copy constructor for a class X will have the form
7 // X::X(const X&)
8 // if [every direct subobject] has a copy constructor whose first parameter is
9 // of type 'const volatile[opt] T &'. Otherwise, it will have the form
10 // X::X(X&)
12 struct ConstCopy {
13 ConstCopy(const ConstCopy &);
16 struct NonConstCopy {
17 NonConstCopy(NonConstCopy &);
20 struct DeletedConstCopy {
21 DeletedConstCopy(const DeletedConstCopy &) = delete;
24 struct DeletedNonConstCopy {
25 DeletedNonConstCopy(DeletedNonConstCopy &) = delete;
28 struct ImplicitlyDeletedConstCopy {
29 ImplicitlyDeletedConstCopy(ImplicitlyDeletedConstCopy &&);
33 struct A : ConstCopy {};
34 struct B : NonConstCopy { ConstCopy a; };
35 struct C : ConstCopy { NonConstCopy a; };
36 struct D : DeletedConstCopy {};
37 struct E : DeletedNonConstCopy {};
38 struct F { ImplicitlyDeletedConstCopy a; };
39 struct G : virtual B {};
41 struct Test {
42 friend A::A(const A &);
43 friend B::B(B &);
44 friend C::C(C &);
45 friend D::D(const D &);
46 friend E::E(E &);
47 constexpr friend F::F(const F &);
48 friend G::G(G &);