clang-format: Format array and dict literals similar to blocks.
authorDaniel Jasper <djasper@google.com>
Wed, 28 May 2014 09:11:53 +0000 (09:11 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 28 May 2014 09:11:53 +0000 (09:11 +0000)
commit335ff26631b142d56b2954e37c51c2a979a34c53
treea91bc5e2587ea14e23860f1561856f004a2ead14
parent82ee0433da3c2d2f2eb9f46f80c463f71bb75c29
clang-format: Format array and dict literals similar to blocks.

Especially, reduce the amount of indentation if it doesn't increase
readability.

Before:
  NSMutableDictionary* dictionary = [NSMutableDictionary
      dictionaryWithDictionary:@{
                                 aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaa,
                                 bbbbbbbbbbbbbbbbbb : bbbbb,
                                 cccccccccccccccc : ccccccccccccccc
                               }];

After:
  NSMutableDictionary* dictionary =
      [NSMutableDictionary dictionaryWithDictionary:@{
        aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaa,
        bbbbbbbbbbbbbbbbbb : bbbbb,
        cccccccccccccccc : ccccccccccccccc
      }];

llvm-svn: 209720
clang/lib/Format/ContinuationIndenter.cpp
clang/unittests/Format/FormatTest.cpp