Before:
auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa -> f()) {}
After:
auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f()) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220373
91177308-0d34-0410-b5e6-
96231b3b80d8
} else if (Current.is(tok::kw_auto)) {
AutoFound = true;
} else if (Current.is(tok::arrow) && AutoFound &&
- Line.MustBeDeclaration) {
+ Line.MustBeDeclaration && Current.NestingLevel == 0) {
Current.Type = TT_TrailingReturnArrow;
} else if (Current.isOneOf(tok::star, tok::amp, tok::ampamp)) {
Current.Type =
" -> alias::tensor<Order, T, mem::tag::cpu> {}");
verifyFormat("auto SomeFunction(A aaaaaaaaaaaaaaaaaaaaa) const\n"
" -> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}");
+ verifyFormat("auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f()) {}");
// Not trailing return types.
verifyFormat("void f() { auto a = b->c(); }");