summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-09-13 10:55:31 +0000
committerDaniel Jasper <djasper@google.com>2013-09-13 10:55:31 +0000
commitf3d977979c05c4ae011da4b50a0db2dac0e1d3dc (patch)
tree6308892cb557e00348b3d35af784586c41b7ef4c /clang/lib
parent57cb2bd0efe396dbfa1cbb666410bacbfd5500e8 (diff)
downloadbcm5719-llvm-f3d977979c05c4ae011da4b50a0db2dac0e1d3dc.tar.gz
bcm5719-llvm-f3d977979c05c4ae011da4b50a0db2dac0e1d3dc.zip
clang-format: Detect braced lists in subscript expressions.
Before (even with Style.Cpp11BracedListStyle): f(MyMap[{ composite, key }]); After: f(MyMap[{composite, key}]); llvm-svn: 190678
Diffstat (limited to 'clang/lib')
-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 3fb46f2f56f..605aebad02b 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -290,7 +290,7 @@ void UnwrappedLineParser::calculateBraceTypes() {
//
// We exclude + and - as they can be ObjC visibility modifiers.
if (NextTok->isOneOf(tok::comma, tok::semi, tok::r_paren,
- tok::l_brace, tok::colon) ||
+ tok::r_square, tok::l_brace, tok::colon) ||
(NextTok->isBinaryOperator() &&
!NextTok->isOneOf(tok::plus, tok::minus))) {
Tok->BlockKind = BK_BracedInit;
OpenPOWER on IntegriCloud