clang-format indents template methods with ref-qualification + noexcept wrongly.

Hi,

Let’s say we have a simple template method with ref-qualification and noexcept.

struct A {
template
void foo(T&& t) & noexcept {
DoSomething();
DoSomethingElse();
}
}

If we use clang-format to re-format the code with google style (or llvm or other styles), we get

struct A {
template
void foo(T&& t) & noexcept {
DoSomething();
DoSomethingElse();
}
}

If we remove the noexcept or if we put a const before ref-qualification the reformat will work correctly.

Sorry the semicolon is missing at the end of class definition but it doesn’t change the result.

Please at least specify major version of clang-format. Mine handles this piece of code just fine (4.0-dev r283306).

It’s windows installer based on SVN r282394 (26 September 2016).

I tried again with the latest version r283423 on mac and it is still the same. The options are “-i -style=google”.

struct A {
template
void foo(T&& t) & noexcept;
};