Formatter: Initial support for ObjC dictionary literals.
authorNico Weber <nicolasweber@gmx.de>
Sun, 10 Feb 2013 20:35:35 +0000 (20:35 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sun, 10 Feb 2013 20:35:35 +0000 (20:35 +0000)
commit372d8dcf15fb860332eace94b05c47783d7dde0f
tree4e0cbe9a4d3fa93ab9e02507fc27856988b8ac2e
parent44bf8158c5973605eb3bf245e225203fb8660b0a
Formatter: Initial support for ObjC dictionary literals.

Before:
  @{
  foo:
    bar
  }
  ;

Now:
  @{ foo : bar };

parseBracedList() already does the right thing from an UnwrappedLineParser
perspective, so check for "@{" in all loops that process constructs that can
contain expressions and call parseBracedList() if found.

llvm-svn: 174840
clang/lib/Format/UnwrappedLineParser.cpp
clang/unittests/Format/FormatTest.cpp