]> granicus.if.org Git - clang/commit
[clang-format] Reference qualifiers in member templates causing extra indentation
authorIlya Biryukov <ibiryukov@google.com>
Fri, 27 Sep 2019 09:24:58 +0000 (09:24 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Fri, 27 Sep 2019 09:24:58 +0000 (09:24 +0000)
commitc40345368252e600c43281438c4ca7ce5aa92d56
tree6819358b60be0c0cb1242b58fc9a29ed030286ce
parent0f7791ecb9716fb6e5c3493db28b7dcf44a06440
[clang-format] Reference qualifiers in member templates causing extra indentation

The following code

```
struct f {
  template <class T>
  void bar() && noexcept {}
};
```

will be formatted to the following with LLVM style, and
`AlwaysBreakTemplateDeclarations: Yes`

```
struct f {
  template <class T>
      void bar() && noexcept {}
};
```

The indentation of the `void bar()` line is wrong.

Patch by Andreas Wass (AndWass)!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373056 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp