Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Format/UnwrappedLineParser.cpp
Show First 20 Lines • Show All 2,855 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
void UnwrappedLineParser::parseNew() { | void UnwrappedLineParser::parseNew() { | ||||
assert(FormatTok->is(tok::kw_new) && "'new' expected"); | assert(FormatTok->is(tok::kw_new) && "'new' expected"); | ||||
nextToken(); | nextToken(); | ||||
if (Style.isCSharp()) { | if (Style.isCSharp()) { | ||||
do { | do { | ||||
// Handle constructor invocation | |||||
curdeius: Nit: comments should be full phrases, ending with full stops | |||||
if (FormatTok->is(tok::l_paren)) | |||||
parseParens(); | |||||
// Handle array initialization syntax | |||||
if (FormatTok->is(tok::l_brace)) | if (FormatTok->is(tok::l_brace)) | ||||
parseBracedList(); | parseBracedList(); | ||||
eoanermineAuthorUnsubmitted Before the patch, this code mistook lambdas in a constructor call for an initialization list. eoanermine: Before the patch, this code mistook lambdas in a constructor call for an initialization list. | |||||
if (FormatTok->isOneOf(tok::semi, tok::comma)) | if (FormatTok->isOneOf(tok::semi, tok::comma)) | ||||
return; | return; | ||||
nextToken(); | nextToken(); | ||||
} while (!eof()); | } while (!eof()); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,474 Lines • Show Last 20 Lines |
Nit: comments should be full phrases, ending with full stops