]> granicus.if.org Git - clang/commit
clang-format: Treat braced lists like other complex parameters.
authorDaniel Jasper <djasper@google.com>
Thu, 12 Jan 2017 19:35:26 +0000 (19:35 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 12 Jan 2017 19:35:26 +0000 (19:35 +0000)
commit3840cfcb048c98504efd8e88789b6e5949db9158
tree138db1a7f807ee8f002bbbe1a67ca43fc22a1412
parent2d285238fc654aaf1b57310153a0dc29c33104cc
clang-format: Treat braced lists like other complex parameters.

Specifically, wrap before them if they are multi-line so that we don't
create long hanging indents. This prevents having a lot of code
indented a lot in some cases.

Before:
  someFunction(Param, {List1, List2,
                       List3});

After:
  someFunction(Param,
               {List1, List2,
                List3});

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