Index: lib/Format/UnwrappedLineParser.cpp =================================================================== --- lib/Format/UnwrappedLineParser.cpp +++ lib/Format/UnwrappedLineParser.cpp @@ -1080,8 +1080,25 @@ if (!FormatTok->isOneOf(tok::identifier, tok::kw_this)) return false; nextToken(); - if (FormatTok->is(tok::ellipsis)) + if (FormatTok->is(tok::equal)) { nextToken(); + int parens = 0; + while (!eof()) { + if (FormatTok->isOneOf(tok::l_paren, tok::l_square)) { + ++parens; + } else if (parens && FormatTok->isOneOf(tok::r_paren, tok::r_square)) { + --parens; + } else if (FormatTok->isOneOf(tok::comma, tok::r_square)) { + break; + } else if (!FormatTok->isOneOf(tok::identifier, tok::coloncolon)) { + return false; + } + + nextToken(); + } + } else if (FormatTok->is(tok::ellipsis)) { + nextToken(); + } if (FormatTok->is(tok::comma)) { nextToken(); } else if (FormatTok->is(tok::r_square)) {