```console $ cat test.cpp template<typename T> struct A { decltype(auto) operator()(T& x) { return x; } }; template<typename T> struct B { auto operator()(T& x) { return x; } }; ``` `clang-format-17 test.cpp` produces ```cpp template <typename T> struct A { decltype(auto) operator()(T & x) { return x; } }; template <typename T> struct B { auto operator()(T &x) { return x; } }; ``` Note that in A it produces `T & x`, in B `T &x` ```console $ clang-format-17 --version Ubuntu clang-format version 17.0.0 (++20230918073327+88bf774c5650-1~exp1~20230918073342.41) ``` I'll note, just in case, that lack of config does not matter, same happens when ReferenceAlignment is defined.