llvm-project/clang/www
Javier Alvarez 5ea341d7c4 [clang] Fix trivially copyable for copy constructor and copy assignment operator
From [class.copy.ctor]:

```
A non-template constructor for class X is a copy constructor if its first
parameter is of type X&, const X&, volatile X& or const volatile X&, and
either there are no other parameters or else all other parameters have
default arguments (9.3.4.7).

A copy/move constructor for class X is trivial if it is not user-provided and if:
- class X has no virtual functions (11.7.3) and no virtual base classes (11.7.2), and
- the constructor selected to copy/move each direct base class subobject is trivial, and
- or each non-static data member of X that is of class type (or array thereof),
  the constructor selected to copy/move that member is trivial;

otherwise the copy/move constructor is non-trivial.
```

So `T(T&) = default`; should be trivial assuming that the previous
provisions are met.

This works in GCC, but not in Clang at the moment:
https://godbolt.org/z/fTGe71b6P

Reviewed By: royjacobson

Differential Revision: https://reviews.llvm.org/D127593
2022-06-17 10:35:01 +03:00
..
analyzer resolve typo in the manual. 2022-04-01 03:15:17 +05:30
demo Replace links to archived mailing lists by links to Discourse forums 2022-03-23 10:10:20 -04:00
OpenProjects.html
UniversalDriver.html
builtins.py
c_dr_status.html Rolling back tests for WG14 DR145 2022-06-15 15:37:14 -04:00
c_status.html Switch links to use https consistently 2022-06-08 15:53:55 -04:00
carbon-compile.png
clang_video-05-25-2007.html
clang_video-07-25-2007.html
compatibility.html
content.css
cxx_compatibility.html
cxx_dr_status.html [clang] Fix trivially copyable for copy constructor and copy assignment operator 2022-06-17 10:35:01 +03:00
cxx_status.html Revert D119136 "[clang] Implement Change scope of lambda trailing-return-type" and its follow-up 2022-04-20 10:57:12 -07:00
diagnostics.html
favicon.ico
feature-compile1.png
feature-compile2.png
feature-memory1.png
features.html
get_involved.html Update Bug report URL to Github Issues 2022-01-06 17:33:25 +08:00
get_started.html [NFC] Suggest Release mode in clang GettingStarted.html 2022-06-10 11:00:05 +05:30
hacking.html [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
index.html
libstdc++4.4-clang0x.patch
libstdc++4.6-clang11.patch
libstdc++4.7-clang11.patch
make_cxx_dr_status [clang][www] Port make_cxx_dr_status script to Python3 2022-02-22 15:47:43 +01:00
menu.css
menu.html.incl Replace links to archived mailing lists by links to Discourse forums 2022-03-23 10:10:20 -04:00
related.html [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
robots.txt