Index: clang/docs/ClangFormatStyleOptions.rst =================================================================== --- clang/docs/ClangFormatStyleOptions.rst +++ clang/docs/ClangFormatStyleOptions.rst @@ -794,7 +794,7 @@ for (int i = 0; i < 10; ++i) { } - * ``BWACS_OnlyMultiLine`` (in configuration: ``OnlyMultiLine``) + * ``BWACS_MultiLine`` (in configuration: ``MultiLine``) Only wrap braces after a multi-line control statement. .. code-block:: c++ Index: clang/include/clang/Format/Format.h =================================================================== --- clang/include/clang/Format/Format.h +++ clang/include/clang/Format/Format.h @@ -803,7 +803,7 @@ /// while (foo || bar) { /// } /// \endcode - BWACS_OnlyMultiLine, + BWACS_MultiLine, /// Always wrap braces after a control statement. /// \code /// if (foo()) Index: clang/lib/Format/Format.cpp =================================================================== --- clang/lib/Format/Format.cpp +++ clang/lib/Format/Format.cpp @@ -181,7 +181,7 @@ IO.enumCase(Value, "false", FormatStyle::BWACS_Never); IO.enumCase(Value, "true", FormatStyle::BWACS_Always); IO.enumCase(Value, "Never", FormatStyle::BWACS_Never); - IO.enumCase(Value, "OnlyMultiLine", FormatStyle::BWACS_OnlyMultiLine); + IO.enumCase(Value, "MultiLine", FormatStyle::BWACS_MultiLine); IO.enumCase(Value, "Always", FormatStyle::BWACS_Always); } }; Index: clang/lib/Format/UnwrappedLineFormatter.cpp =================================================================== --- clang/lib/Format/UnwrappedLineFormatter.cpp +++ clang/lib/Format/UnwrappedLineFormatter.cpp @@ -311,7 +311,7 @@ (TheLine->First->is(tok::r_brace) && TheLine->First->Next && TheLine->First->Next->isOneOf(tok::kw_else, tok::kw_catch))) && Style.BraceWrapping.AfterControlStatement == - FormatStyle::BWACS_OnlyMultiLine) { + FormatStyle::BWACS_MultiLine) { // If possible, merge the next line's wrapped left brace with the current // line. Otherwise, leave it on the next line, as this is a multi-line // control statement. @@ -624,7 +624,7 @@ // } if (Line.First == Line.Last && Style.BraceWrapping.AfterControlStatement == - FormatStyle::BWACS_OnlyMultiLine) + FormatStyle::BWACS_MultiLine) return 0; return 2; Index: clang/unittests/Format/FormatTest.cpp =================================================================== --- clang/unittests/Format/FormatTest.cpp +++ clang/unittests/Format/FormatTest.cpp @@ -1445,7 +1445,7 @@ TEST_F(FormatTest, MultiLineControlStatements) { FormatStyle Style = getLLVMStyle(); Style.BreakBeforeBraces = FormatStyle::BraceBreakingStyle::BS_Custom; - Style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_OnlyMultiLine; + Style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_MultiLine; Style.ColumnLimit = 20; // Short lines should keep opening brace on same line. EXPECT_EQ("if (foo) {\n" @@ -12571,9 +12571,9 @@ Style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_Never; CHECK_PARSE("BraceWrapping:\n" - " AfterControlStatement: OnlyMultiLine", + " AfterControlStatement: MultiLine", BraceWrapping.AfterControlStatement, - FormatStyle::BWACS_OnlyMultiLine); + FormatStyle::BWACS_MultiLine); CHECK_PARSE("BraceWrapping:\n" " AfterControlStatement: Always", BraceWrapping.AfterControlStatement, FormatStyle::BWACS_Always);