clang-format: Format Objective-C try blocks like all the other try blocks.
authorNico Weber <nicolasweber@gmx.de>
Sat, 7 Feb 2015 01:57:32 +0000 (01:57 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 7 Feb 2015 01:57:32 +0000 (01:57 +0000)
commit33381f5e0b9f75f0e691ac5f8a057a937e5aee09
tree6692dcf42099c9b9d091b2a56ad0c03ee1b94744
parent94269a4db35f092b5ea100b7b5ecabaea281a181
clang-format: Format Objective-C try blocks like all the other try blocks.

Before:

  @try {
    // ...
  }
  @finally {
    // ...
  }

Now:

  @try {
    // ...
  } @finally {
    // ...
  }

This is consistent with how we format C++ try blocks and SEH try blocks.
clang-format not doing this before was an implementation oversight.

This is dependent on BraceBreakingStyle.  The snippet above is with the
Attach style.  Style Stroustrip for example still results in the "Before:"
snippet, which makes sense since other blocks (try, else) break after '}' too.

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