]> granicus.if.org Git - clang/commit
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)
commitd74fcdb630dad817f5d462edd6d12bb95e3f27f1
tree539c2ea1d77eb71e1b4d0942b2fb4a78ed2392ee
parentf0c5456d7d6a9f74281011297d86cb3b1fa53cc1
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.

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