<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62418>62418</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            x86 Clang can't compile forwarded non-trivially copyable params
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          pkasting
      </td>
    </tr>
</table>

<pre>
    ```
$ cat foo.cc
class A {
  A(const A&);
};
auto x = +[](A) {};

$ third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /c foo.cc -m32
foo.cc(4,15): error: cannot compile this forwarded non-trivially copyable
      parameter yet
auto x = +[](A) {};
 ^
1 error generated.
```

The compile error goes away with -m64 instead of -m32. MSVC x86 can compile this code (https://godbolt.org/z/c4W5fxzW8).

The precise error here dates to https://reviews.llvm.org/rG25b56024aa369df85e9c0d986ace6a5bac164664, which talked about diagnosing "PR28299 while I work on a proper solution". I'm assuming that proper solution never happened.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8GOpDYQ_RpzKTWiC3DDgUPPTDraQ6RoE2WPUWFXgzPGRraZnt6vj-hmZrJziRYhVNjl8nuv6lGMZnDMnagfRP2U0ZJGH7r5mWIybsh6r6-dkMX2Fk-iOAqsQFGCs_e5Uvc1ZSlGOII4PNwXAI4CG-VdTGskBbai3PbE4ek9piV5eAVRPoHAhzsKgc1RYHsr9p_Uj9vTaIL-e6aQrgJP1r5Mu34xVgs8fWXLFFngwzFGDikKPPXGCTwpS27YKZvzK8P6vxGA3VTivfbGCJtK4OO-vmE-Aofgwxoocs4nUH6ajeUVRYSzDxcKmjU473YpmBdD1l5B-flKveU3NdZnpkATJw5w5fTT9EHUv9yj_R0SDOw4UGKdb9J86tPt--fI74i3Y54j0IWucDFphN0kKzAuJiYN_nyTI4ff_vjrEV4buZL-kbHyetWvGVOaoyiPAk8CT4PXvbcp92EQePq-6lt9q8-v3781Atv8M6I5sDLxDdHIgUFT4gjJw4-FA78YvsR87fJWPfyKdV_LAiuiUrb63NTcqkK3jSTFkuqe1F5WUq5thMto1AiJ7DNroN4vCbShwflo3AAC8fev2GDbromW4QtcfHgG74BgDn7mANHbJRnvBGIOXwQeJqAYl2k9n0ZKn_PA8QsHGGme2bHOM92Vui1byrjbywYltnWN2dgpqc9aSqVL1AdJVKDq93tiYlUfiMrMdFhgWVR4wH1R15gfuKWzblVRlUXVq72oCp7I2Hd5MhPjwp3Eat9klnq28eZtRMcXuG0KxNXqoduMM0RRFdbE9CFylkyy3K39f1xts06BwMPH7P_f2N9nPWZLsN2nQTFpXPpc-Wmz7puD5-D_YZUEnm4oV-PeWPwbAAD__9O3bb4">