diff options
| author | Daniel Jasper <djasper@google.com> | 2013-09-13 10:55:31 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-09-13 10:55:31 +0000 |
| commit | f3d977979c05c4ae011da4b50a0db2dac0e1d3dc (patch) | |
| tree | 6308892cb557e00348b3d35af784586c41b7ef4c /clang/lib | |
| parent | 57cb2bd0efe396dbfa1cbb666410bacbfd5500e8 (diff) | |
| download | bcm5719-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.cpp | 2 |
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; |

