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 @@ -5173,6 +5173,17 @@ " \"bbbb\");\n" "}", getLLVMStyleWithColumns(30)); + verifyFormat("testPR42722() {\n" + " int c = 19;\n" + " int d = 32;\n" + " Executor ex;\n" + " ex.addFuture([]() {\n" + " throw std::runtime_error(\"oops\");\n" + " }).then([](Result &&result) {\n" + " c++;\n" + " d++\n" + " });\n" + "}"); } TEST_F(FormatTest, BreaksAccordingToOperatorPrecedence) {