<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/139616>139616</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] Check request: modernize-use-std-construct-at
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
denzor200
</td>
</tr>
</table>
<pre>
Needs a check that will find an inplace constructor calling and will suggest to use `std::construct_at` instead.
BEFORE:
```
alignas(T) unsigned char buffer[sizeof(T)];
auto* p = new(buffer) T{}; // WARNING AND FIX-IT
```
AFTER:
```
alignas(T) unsigned char buffer[sizeof(T)];
auto* p = std::construct_at(reinterpret_cast<T*>(buffer));
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0Us1u2zwQfJrVZSGDWlmWdNBBjq0PufgDAgPtLaDFlcSWplz-JEievpBqpEHRa4EFeJlZzsyO9F6PlrmBYg_FIZExTLNrFNv32ZEQyWVWb82JWXmU2E_cf8cwyYCv2hgctFUoLWp7M7Jn7Gfrg4t9mB320hhtR5RW_QL7OI7sA4YZo2eEnfBBQd5C3n7wnmWAnUBtfWCpNiBaEO3-2P3_dFyQooWduI9opdGjlR6oOgPVGO1qRWE_SYeXOAzsoNh7_c7zcAdBcYB8v3BjmIFavCHkB7T8ClTdKVTjGco9lAsUgTqgDr-0T6fH03_Yng7YPX5NH89_iGm78_HpX2r8e1hUOdY2sLs5Ds-99AHyhzNQC_nxs6Vl1qUf4hLV5KrOa5lwk5XbUlRiK4pkarYqy6us5iqrhZBlVWS9lIMoy6JQFW050Q0JKkSREQmx2xYbNVR5WQ10ybhSAxNsBV-lNhtjXq6b2Y2J9j5yk-X1LtslRl7Y-LVxRL2RdkyDVm9AtDTQNQsrvcTRw1YY7YP_vSfoYNaufqIVB3xYe-n4R-QlgBavs2Jn9Tun0XPqg0o_UktlSKIzzRTCzS-JrgcedZjiZdPPV6Bu-e7-pDc3f-M-AHWrBw_U3W28NPQzAAD__9hf_gs">