diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 37e9ba8643dd..841ac552a552 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3066,6 +3066,9 @@ TEST_F(FormatTest, PullTrivialFunctionDefinitionsIntoSingleLine) { "}"); verifyFormat("void f() {} // comment"); verifyFormat("void f() { int a; } // comment"); + verifyFormat("void f() {\n" + "} // comment", + getLLVMStyleWithColumns(15)); verifyFormat("void f() { return 42; }", getLLVMStyleWithColumns(23)); verifyFormat("void f() {\n return 42;\n}", getLLVMStyleWithColumns(22));