]> granicus.if.org Git - clang/commit
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)
commitd519dc975cf544718d9a46a63ec57cc7727cada2
tree4e9da2ff339910d9033d101fa10fae942f0f6494
parent9e6a299419ec5b0a4b08ae13d2c4b1170293222b
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
      }];

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