<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59131>59131</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
trivial_abi can't be used on class inherited from trivial_abi base class with user-defined move constructor on windows
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zmodem
</td>
</tr>
</table>
<pre>
Consider:
```
$ cat /tmp/a.cc
class [[clang::trivial_abi]] Base {
public:
Base() {}
~Base() {}
Base(Base&&) noexcept = default;
};
class [[clang::trivial_abi]] Derived : public Base {};
$ build/bin/clang -c -target x86_64-pc-win32 /tmp/a.cc
/tmp/a.cc:8:9: warning: 'trivial_abi' cannot be applied to 'Derived' [-Wignored-attributes]
class [[clang::trivial_abi]] Derived : public Base {};
^
/tmp/a.cc:8:9: note: 'trivial_abi' is disallowed on 'Derived' because it has a base of a non-trivial class type
1 warning generated.
```
It seems that since `Base` is also declared with the `trivial_abi` attribute, using `trivial_abi` on the derived class should be possible?
(Based on http://crbug.com/1383397)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VNty2yAQ_RrphZFHAluXBz04cTzTL-hjhpstOgg0gOKkX98FyY7TpNPpQz2AkHbZPeewa2bFW_9ojVdCuozss_KQlde1LtexvOIt4jSgDB_DOMFKN5wvJq6p9yjbPcCAvTnHSGQfnHpRVD9TprLdAQZ6oF6irHlYjqFpZlrxW1qU7BluM9wlr-ZwNWTN0x9tq2F51Gl0yFj5yuUEcMkBCXmisw4ZWRPHw7f9vzE4SPgkBYS9wn8n9SlqlIzNSgtQiykDa4qNCo6KQN1ZBvTa1s_1tph4cVGG4K_U_fiJ7FuYXcx_oc6oBBWONfdYcQNXZYwNiElEp0krgBxsdFsJRBfgWnxXZ2OdFAUNEIDNQfrI9L-IgtZftnv6CzNALr-mpTwSylOt7QUSWvMbJSY5nSGzCmigHlHEIg57gp2xpliDoYVZeJvkAqS6aonO0khHgxSbr5sgrd8C8lKOEGGAhvDKcOBal6kC6zJipNpbKDvIA9qiiwoD-Canez7ge5M9w49o9hHCZyegGU-LVeYFvR_srEW84Ml6r5gGxY4fqy_1RFJpCGGKt4ePsQgdm88bbkfYV6QlpGugZXLZV3XdVQR3pM1FT0RHOpoHFbTs7wDFyor3EjPPa_gFkTIDIATt0MnZEd2fSdeweCUx4KAroC2VAe_RvoAR_oSCm3mwLkaEbhD24vPZ6T6C9zf0Zzg_sxW-1i_XRzE5-0PyAK_K-xnqGB93QKfKh543DWtrvOWkEdumOVWnUjAhtuWJd82WlbmmTGrfx1rH2MgLSiFgD-Wdqx6XGFcVzLqEucFd29KWdEK0uMJtnW1LOVKlNxHHxrpz7voECXT2YNTKB_9uBBWg66RM6SA-ncNgXf9ztEKOecrcJ-S_APuPtLk">