]> granicus.if.org Git - clang/commit
Slightly modify the formatting rules for braced lists.
authorDaniel Jasper <djasper@google.com>
Fri, 17 May 2013 09:35:01 +0000 (09:35 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 17 May 2013 09:35:01 +0000 (09:35 +0000)
commit399914b7a61a3823cc74ef3e47b1cde42528b9bf
treeb7e3ca7e575f78c848c5ecfa4d85a12f69c9a92a
parent7b773002d0beae96a8a34ec9413877242381ec75
Slightly modify the formatting rules for braced lists.

Basically, the new rule is: The opening "{" always has to be on the
same line as the first element if the braced list is nested
(e.g. in another braced list or in a function).

The solution that clang-format produces almost always adheres to this
rule anyway and this makes clang-format significantly faster for larger
lists. Added a test cases for the only exception I could find
(which doesn't seem to be very important at first sight).

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