]> granicus.if.org Git - clang/commit
Fixes formatting of function calls etc inside an initializer list.
authorManuel Klimek <klimek@google.com>
Thu, 10 Jan 2013 14:36:46 +0000 (14:36 +0000)
committerManuel Klimek <klimek@google.com>
Thu, 10 Jan 2013 14:36:46 +0000 (14:36 +0000)
commit2851c16443dcdb9d8bb509d321fb827a560b47bc
treebb45e9583ce8cc7f41f72a5704200700e394842d
parent36fab8d70eee342d66e03c9b09c029f126196103
Fixes formatting of function calls etc inside an initializer list.

We're now formatting (column limit 25):
int x = {
  avariable,
  b(alongervariable) };

This also fixes:
Aaa({
  int i;
}, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
                                    ccccccccccccccccc));
... where we would previously break after the '},'.

Putting the closing curly into an extra line when there's a break
directly after the first curly will be done in a subsequent patch.

Paired with djasper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172070 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp