<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63879>63879</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Regression in clang-format version 17?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
prj-
</td>
</tr>
</table>
<pre>
```console
$ cat weird.cxx
namespace detail
{
struct dotnorm2_mult {
PETSC_NODISCARD PETSC_HOSTDEVICE_INLINE_DECL thrust::tuple<PetscScalar, PetscScalar> operator()(const PetscScalar &s, const PetscScalar &t) const noexcept
{
}
}
}
$ clang-format --version
clang-format version 16.0.6
$ clang-format --style=file:clang-format.txt weird.cxx
namespace detail
{
struct dotnorm2_mult {
PETSC_NODISCARD PETSC_HOSTDEVICE_INLINE_DECL thrust::tuple<PetscScalar, PetscScalar> operator()(const PetscScalar &s, const PetscScalar &t) const noexcept { }
}
} // namespace detail
$ clang-format-17 -version
Debian clang-format version 17.0.0 (++20230705100851+7cab385a8f4a-1~exp1~20230705221003.1424)
$ clang-format-17 --style=file:clang-format.txt weird.cxx
namespace detail
{
struct dotnorm2_mult {
PETSC_NODISCARD PETSC_HOSTDEVICE_INLINE_DECL thrust::tuple<PetscScalar, PetscScalar> operator()(const PetscScalar & s, const PetscScalar & t) const noexcept { }
}
} // namespace detail
```
Notice the change from `const PetscScalar &s, const PetscScalar &t` to `const PetscScalar & s, const PetscScalar & t`. You'll find attached the used [clang-format.txt](https://github.com/llvm/llvm-project/files/12060432/clang-format.txt).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkVUtv4joU_jUnG4vIseM8FlkAAV2kilalutJdIeMY4srEke300k1_-ygBOvTBzFSazWgkhI997KPvcexw59SukbIANgFWBrzztbFFax9HwcZUzwUk-PgTpnFGS8Al4DGQGAnu0f9S2SoUh8NxueF76VouJKqk50ofVxGkk1PkvO2ER5XxjbF7st532l-k72YPq-l6eVsuVtPxfXma_3O7eihn_y6ms_ViebNYztblbHqDfG0754GOgY5912oJdHonvRMrwTW3QKbockpnyLTScm8skAxIDiTrOfnLXQhI4vqTn2Y8kPyUaYw8CNn6E3B0QaKPy1fmH6JBOs2b3Whr7J57NBo9SeuUaY75N7lTBkVJiMPkagHnn3v65Vb1w5sSoT_8ok2vDH5i0h_oUo_-woGLAAGZA5mjK5K8k3oUpeitW6XcKN6gz01LQxxiNPCYAJkQTChOMYswzlgEZJIKvqEZ49k25qPoRR7a6OW8iZAIYxpGMYl7Fa7D-RvNR9fdR7_T_vPbd5wujVdCIl9LJGre7CTaWrNHp7fxSx2aYOTN1ZM_ppfgEP1nOiCp1mirmgpx77moZTVA65ysELDJ-z4AVgLJau9b1xsy8N4pX3ebUJg9kLnWT-dh1FrzKIUHMu-7ygGZRwQnOKYEyPxDZZKHJ8GG_6AqaJXTnAeyiJIsp3nKojSoC5qlEcc5zZgQcSbYNhaUMSYyyiqSJCJQxbH9I4YZZlEaVlHOZFbFMZMCbzGFGMs9VzrsUYbG7gLlXCeLhGZpHmi-kdqdP2W2GKhsup2DGGvlvPt-zCuvZXEvd1a64bKqq5cY6DzorC6-LN0ArdduQPctAAD__40kSP0">