]> granicus.if.org Git - clang/commit
clang-format: use AfterControlStatement to format ObjC control blocks
authorFrancois Ferrand <thetypz@gmail.com>
Tue, 27 Feb 2018 13:48:27 +0000 (13:48 +0000)
committerFrancois Ferrand <thetypz@gmail.com>
Tue, 27 Feb 2018 13:48:27 +0000 (13:48 +0000)
commitf555279b9acafade47501d48a9de2ce719d103f2
treefe6ca4dfcf7ee0872094c1f54089398554b86761
parentf75a680d85938e88e65be0c58f48a21a77f5d0b7
clang-format: use AfterControlStatement to format ObjC control blocks

ObjC defines `@autoreleasepool` and `@synchronized` control blocks. These
used to be formatted according to the `AfterObjCDeclaration` brace-
wrapping flag, which is not very consistent.

This patch changes the behavior to use the `AfterControlStatement` flag
instead. This should not affect the behavior unless a custom brace
wrapping mode is used.

Reviewers: krasimir, djasper, klimek, benhamilton

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D43232

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326192 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Format/Format.h
lib/Format/UnwrappedLineFormatter.cpp
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTestObjC.cpp