[all-commits] [llvm/llvm-project] 76ec6b: [clang-format] [PR35518] C++17 deduction guides ar...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Wed Nov 6 00:35:00 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 76ec6b1ef69fcbd27cb0d587a5eb2d51a135a6bb
      https://github.com/llvm/llvm-project/commit/76ec6b1ef69fcbd27cb0d587a5eb2d51a135a6bb
  Author: paulhoad <mydeveloperday at gmail.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

Summary:
see https://bugs.llvm.org/show_bug.cgi?id=35518

clang-format removes spaces around deduction guides but not trailing return types, make the consistent

```
template <typename T> S(T)->S<T>;
auto f(int, int) -> double;
```

becomes

```
template <typename T> S(T) -> S<T>;
auto f(int, int) -> double;
```

Reviewers: klimek, mitchell-stellar, owenpan, sammccall, lichray, curdeius, KyrBoh

Reviewed By: curdeius

Subscribers: merge_guards_bot, hans, lichray, cfe-commits

Tags: #clang-format, #clang-tools-extra, #clang

Differential Revision: https://reviews.llvm.org/D69577




More information about the All-commits mailing list