Issue 63879
Summary Regression in clang-format version 17?
Labels
Assignees
Reporter prj-
    ```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).


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to