Formatter: Add a test for multi-line ObjC dict literals.
authorNico Weber <nicolasweber@gmx.de>
Sun, 10 Feb 2013 20:48:24 +0000 (20:48 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sun, 10 Feb 2013 20:48:24 +0000 (20:48 +0000)
commit0448b4dd872f37193fdc5099daa31277527b15a5
treeebf0161906b19051dcc0b6b0ba1e607bf13a7bea
parent33c68e900bd2624d2d5f896f2697cbb80fb24475
Formatter: Add a test for multi-line ObjC dict literals.

As it turns out, this already works reasonably well.

This example from http://clang.llvm.org/docs/ObjectiveCLiterals.html
NSDictionary *dictionary = @{
    @"name" : NSUserName(),
    @"date" : [NSDate date],
    @"processInfo" : [NSProcessInfo processInfo]
};

is formatted like
NSDictionary *dictionary = @{ @"name" : NSUserName(), @"date" : [NSDate date],
                              @"processInfo" : [NSProcessInfo processInfo] };

There's already a FIXME in NestedStaticInitializers about supporting one
initializer per line, which is really all that's missing here too.

llvm-svn: 174842
clang/unittests/Format/FormatTest.cpp