[clang-format] [PR35518] C++17 deduction guides are wrongly formatted
authorpaulhoad <mydeveloperday@gmail.com>
Wed, 6 Nov 2019 09:34:01 +0000 (09:34 +0000)
committerpaulhoad <mydeveloperday@gmail.com>
Wed, 6 Nov 2019 09:34:48 +0000 (09:34 +0000)
commit76ec6b1ef69fcbd27cb0d587a5eb2d51a135a6bb
tree87e2f352250478e90e738645b2e0e57217909a41
parent1a6903bdfeca5facfc0c595e7cf9a14f0e87fb0e
[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
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp