<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56372>56372</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-tidy 13.0.1 suggests fixes which may break code
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
themightyoarfish
</td>
</tr>
</table>
<pre>
clang-tidy will suggest to change code like this
```
std::shared_ptr<Foo> foo ...;
…
foo.reset(new Foo);
```
to
```
std::shared_ptr<Foo> foo ...;
…
foo = std::make_shared<Foo>(…);
```
However, `make_shared` does not respect custom alignment requirements which the `Foo` type may have. `new` should do that, from what I understand. This is an issue at least in C++14.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1Uk1v2zAM_TXyhaggyx9xDj6kSYvtvnuhWLSlRbYySU6Wfz_aadrusOMAQib9xMcnkkevb23n1DQ8JatvcLXOQZyHAWOC5KEzBCF0XiM4e0JIxkYmDkzsWC3ebQ1j0qzYkUWjAuq3cwqs2L96z4oX6L0Hzjkrnt9zXyRrBNvV95BgHjBiYrKZ8ApLltx-3v67Esn6HwqAFQf44BjVCd_uRB8kpO4z7d_67uc3f8ULBib3QMhXulqA9hhh8gno1WfsEnRzTH4E5ewwjTgtwK_ZBlz8CFdjO0Otx4Vq0UIU6XZGGNUNjLogXwDq3AJE42enqQQlqLTU7wNRXymA7zBPGkNMatIcftAsgUxNdMYZgW44VDR5O8GeyWeyvOSZbgu9LbYqSzY5_LouecEFzx8LE6G3v_Ehd9F2DKhO6_Zkc3CtSekcl_7KV7LBJjMfeedHCpy7PD5P5-B_UlMoXGVFcqq62MjMtFrmXV_KZlPquuyVFPm2qLuqop91pTdN5tQRXWxZReLlsksrBfmsOmS2lUJKsRFlLkohBO_LTSOUzHOtGt1VkpUCR2UdX3RwH4YstKuk4zxEAp2lV36CKkaaF-JajvjVnIwPLQ1qtINJN69Cb6PJVg3t-oY_UiEMyw">