[PATCH] D43232: clang-format: use AfterControlStatement to format ObjC control blocks

Francois Ferrand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 07:37:13 PST 2018


Typz added a comment.

In https://reviews.llvm.org/D43232#1008004, @benhamilton wrote:

> Thanks! Can you add a test for this, please?


There are actually tests, though they are performed by activating Allman brace wrapping mode.
I am trying to change them, but this highlights another issue: when only `AfterControlStatement` is set, the block gets inlined, like this:

  @autoreleasepool
  { f(); }

This used to happen before as well, and would require fixing UnwrappedLineFormatter.cpp to understand that these blocks are linked to the previous ObjC keyword.


Repository:
  rC Clang

https://reviews.llvm.org/D43232





More information about the cfe-commits mailing list