|
@@ -747,6 +747,8 @@ private:
|
|
}
|
|
}
|
|
} else if (Current.isOneOf(tok::kw_return, tok::kw_throw)) {
|
|
} else if (Current.isOneOf(tok::kw_return, tok::kw_throw)) {
|
|
Contexts.back().IsExpression = true;
|
|
Contexts.back().IsExpression = true;
|
|
|
|
+ } else if (Current.is(TT_TrailingReturnArrow)) {
|
|
|
|
+ Contexts.back().IsExpression = false;
|
|
} else if (Current.is(tok::l_paren) && !Line.MustBeDeclaration &&
|
|
} else if (Current.is(tok::l_paren) && !Line.MustBeDeclaration &&
|
|
!Line.InPPDirective &&
|
|
!Line.InPPDirective &&
|
|
(!Current.Previous ||
|
|
(!Current.Previous ||
|
|
@@ -973,7 +975,8 @@ private:
|
|
return TT_UnaryOperator;
|
|
return TT_UnaryOperator;
|
|
|
|
|
|
const FormatToken *NextToken = Tok.getNextNonComment();
|
|
const FormatToken *NextToken = Tok.getNextNonComment();
|
|
- if (!NextToken || NextToken->is(tok::l_brace))
|
|
|
|
|
|
+ if (!NextToken ||
|
|
|
|
+ (NextToken->is(tok::l_brace) && !NextToken->getNextNonComment()))
|
|
return TT_Unknown;
|
|
return TT_Unknown;
|
|
|
|
|
|
if (PrevToken->is(tok::coloncolon))
|
|
if (PrevToken->is(tok::coloncolon))
|