[cfe-users] [clang-format] Trailing return type

Mateusz Loskot via cfe-users cfe-users at lists.llvm.org
Wed Oct 31 14:23:23 PDT 2018


I'm looking for clang-format features to control formatting of
functions with trailing return type.

I found this related change

What are the options to control the formatting presented in that message?
Namely, how to achieve the "After" formatting as copied here?

  template <typename T>
  auto aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(eaaaaaaaaaaaaaaa<T>(t.a)

  template <typename T>
  auto aaaaaaaaaaaaaaaaaaaaaa(T t)
      -> decltype(eaaaaaaaaaaaaaaa<T>(t.a).aaaaaaaa());

There seem to be nothing related to trailing return or arrow formatting
on https://clang.llvm.org/docs/ClangFormatStyleOptions.html

Best regards,
Mateusz Loskot, http://mateusz.loskot.net

More information about the cfe-users mailing list