Index: include/clang/Format/Format.h =================================================================== --- include/clang/Format/Format.h +++ include/clang/Format/Format.h @@ -651,7 +651,9 @@ /// } /// \endcode bool AfterNamespace; - /// \brief Wrap ObjC definitions (``@autoreleasepool``, interfaces, ..). + /// \brief Wrap ObjC definitions (interfaces, implementations...). + /// \note @autoreleasepool and @synchronized blocks are wrapped + /// according to `AfterControlStatement` flag. bool AfterObjCDeclaration; /// \brief Wrap struct definitions. /// \code Index: lib/Format/UnwrappedLineParser.cpp =================================================================== --- lib/Format/UnwrappedLineParser.cpp +++ lib/Format/UnwrappedLineParser.cpp @@ -1115,7 +1115,7 @@ case tok::objc_autoreleasepool: nextToken(); if (FormatTok->Tok.is(tok::l_brace)) { - if (Style.BraceWrapping.AfterObjCDeclaration) + if (Style.BraceWrapping.AfterControlStatement) addUnwrappedLine(); parseBlock(/*MustBeDeclaration=*/false); } @@ -1127,7 +1127,7 @@ // Skip synchronization object parseParens(); if (FormatTok->Tok.is(tok::l_brace)) { - if (Style.BraceWrapping.AfterObjCDeclaration) + if (Style.BraceWrapping.AfterControlStatement) addUnwrappedLine(); parseBlock(/*MustBeDeclaration=*/false); }