<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64078>64078</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++] std::assume_aligned should diagnose insufficiently aligned pointers during constant evaluation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
enhancement,
good first issue,
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
philnik777
</td>
</tr>
</table>
<pre>
Clang allows `__builtin_assume_aligned` to be used inside a constant expression. So while we can't return the pointer returned from `__builtin_assume_aligned`, we can still call it to diagnose insufficiently aligned pointers during constant evaluation. https://godbolt.org/z/GPGjrGM9K
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysksuK3DwQhZ9G3hTT2PJ94cVc8Cx-fgjkARpdqm1NZKlRlWYyefpg00km2WQTEAgkTp2v6pQicktAnET7INqnQmVeY5quq_PBfen7vtDRvk-PXoUFlPfxjUB05fmss_PswlkR5Q3Pyu9lrOhK4AgaIRNacIGcRVBgYiBWgQG_XhMSuRhO8DnC2-o8whuCUUHIniEh5xSAV4RrdIEx3Z7QwiXF7S_mQj7eqgGx8x6M8h4c71DWqSVEwp0qXy7OOAzs3-Gm_uFHYHNyYfnA_Kp8Vnwwr8xXEvW9kLOQ8xKtjp5PMS1Czt-EnJ8_Pb-k5__H_wo71XasR1XgVHVjKat6GLtinbDTODbN2F1k1w5mqLTpxmrolCkrU4194SZZyrrsZVO1bVV3p6GvLrrRg8G2aks1iqbETTl_8v51270LR5Rx6pqyHwqvNHo68pQSw6qCwQ0DCymFfBRSLjFauLhEDIfu54d32gj5cBy5L0Oadoc7nRcSTekdMf3yZMf-WJsPsvYJiO0-nvr-92yA1pi9_RchFDn56Y8cHK9Zn0zchJx3wtt1d03xBQ0LOR-tkpDzMaXvAQAA___xZv_c">