diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -6281,6 +6281,13 @@ " : bbbbbbbbbbbbbbbbbbbbbbb ? 2222222222222222\n" " : 3333333333333333;", Style); + + Style.AlignOperands = FormatStyle::OAS_DontAlign; + Style.BreakBeforeTernaryOperators = false; + verifyFormat("int x = aaaaaaaaaaaaaaa ? aaaaaaaaaaaaaaaaaa :\n" + " bbbb ? cccccccccccccccccc :\n" + " ddddd;\n", + Style); } TEST_F(FormatTest, BreaksConditionalExpressionsAfterOperator) {