summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-12-22 15:48:35 +0000
committerDaniel Jasper <djasper@google.com>2015-12-22 15:48:35 +0000
commitb542f9f1442569d6247877ba8bfab51008544e9f (patch)
tree5e0e49ce6dc41364c4e79803a86b8df3117a438f /clang/lib/Format
parente2deb59fa3e1e13991b0fe370781d92913767717 (diff)
downloadbcm5719-llvm-b542f9f1442569d6247877ba8bfab51008544e9f.tar.gz
bcm5719-llvm-b542f9f1442569d6247877ba8bfab51008544e9f.zip
clang-format: [JS] Support arrays of object-type literals.
Before: interface I { o: {} []; } After: interface I { o: {}[]; } llvm-svn: 256247
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index ac534a2abe5..1213332d273 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -357,7 +357,7 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) {
ProbablyBracedList =
NextTok->isOneOf(tok::comma, tok::period, tok::colon,
tok::r_paren, tok::r_square, tok::l_brace,
- tok::l_paren, tok::ellipsis) ||
+ tok::l_square, tok::l_paren, tok::ellipsis) ||
(NextTok->is(tok::semi) &&
(!ExpectClassBody || LBraceStack.size() != 1)) ||
(NextTok->isBinaryOperator() && !NextIsObjCMethod);
OpenPOWER on IntegriCloud