diff options
| author | Daniel Jasper <djasper@google.com> | 2013-11-22 07:26:53 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-11-22 07:26:53 +0000 |
| commit | b631d5e6f3de87697b88829f312e55d947f2c760 (patch) | |
| tree | b00cfb027e1206dbdab67555dc19bcac542d1457 /clang/lib/Format | |
| parent | 983f94a2b68eb6d650b4f769a3040abe9f40e420 (diff) | |
| download | bcm5719-llvm-b631d5e6f3de87697b88829f312e55d947f2c760.tar.gz bcm5719-llvm-b631d5e6f3de87697b88829f312e55d947f2c760.zip | |
clang-format: Recognize braced lists with trailing function call.
Before:
int count = set<int> { f(), g(), h() }
.size();
After:
int count = set<int>{f(), g(), h()}.size();
llvm-svn: 195417
Diffstat (limited to 'clang/lib/Format')
| -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 d0743081018..016c4db07bf 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -322,7 +322,7 @@ void UnwrappedLineParser::calculateBraceTypes() { // (for example while parsing lambdas). // // We exclude + and - as they can be ObjC visibility modifiers. - if (NextTok->isOneOf(tok::comma, tok::semi, tok::r_paren, + if (NextTok->isOneOf(tok::comma, tok::semi, tok::r_paren, tok::period, tok::r_square, tok::l_brace, tok::colon) || (NextTok->isBinaryOperator() && !NextTok->isOneOf(tok::plus, tok::minus))) { |

