summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-04-29 14:05:20 +0000
committerDaniel Jasper <djasper@google.com>2014-04-29 14:05:20 +0000
commit35995679c65c36363e347054c966b6b0ac81f8bd (patch)
tree266cf9c9e4487e9f908c4d2ad45a8b895b33f8fd /clang/unittests/Format/FormatTest.cpp
parentdd18d5b0f6aea5d13fbe653a1bfa20fa17531add (diff)
downloadbcm5719-llvm-35995679c65c36363e347054c966b6b0ac81f8bd.tar.gz
bcm5719-llvm-35995679c65c36363e347054c966b6b0ac81f8bd.zip
clang-format: Allow single-line function in WebKit style.
Before: void f() { return; } After: void f() { return; } llvm-svn: 207527
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp3
1 files changed, 3 insertions, 0 deletions
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"
OpenPOWER on IntegriCloud