From 35995679c65c36363e347054c966b6b0ac81f8bd Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Tue, 29 Apr 2014 14:05:20 +0000 Subject: clang-format: Allow single-line function in WebKit style. Before: void f() { return; } After: void f() { return; } llvm-svn: 207527 --- clang/unittests/Format/FormatTest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 084d1dd33d8..02a77af4f75 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -8198,6 +8198,9 @@ TEST_F(FormatTest, FormatsWithWebKitStyle) { "}", Style)); + // Allow functions on a single line. + verifyFormat("void f() { return; }", Style); + // Constructor initializers are formatted one per line with the "," on the // new line. verifyFormat("Constructor()\n" -- cgit v1.2.3