summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-12-21 18:31:15 +0000
committerDaniel Jasper <djasper@google.com>2015-12-21 18:31:15 +0000
commiteb65e912aaa0cb0bb7adf138495f3e25fb2ecdf6 (patch)
tree146c6e7dde2bfebec447e5008736aed6662a17e9 /clang/unittests/Format/FormatTest.cpp
parent3e88a3200ce111ee6491fedd5a48c5308afc3cad (diff)
downloadbcm5719-llvm-eb65e912aaa0cb0bb7adf138495f3e25fb2ecdf6.tar.gz
bcm5719-llvm-eb65e912aaa0cb0bb7adf138495f3e25fb2ecdf6.zip
clang-format: Properly set the BlockKind for more blocks.
Before: void f() { struct Dummy { }; f(); } After: void f() { struct Dummy {}; f(); } llvm-svn: 256175
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 1f09ee3d513..6245f8c0434 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -313,7 +313,7 @@ TEST_F(FormatTest, FormatIfWithoutCompoundStatement) {
" f();\n"
"}",
AllowsMergedIf);
- verifyFormat("if (a) {/* Never merge this */\n"
+ verifyFormat("if (a) { /* Never merge this */\n"
" f();\n"
"}",
AllowsMergedIf);
@@ -6532,6 +6532,12 @@ TEST_F(FormatTest, FormatsBracedListsInColumnLayout) {
" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb};");
verifyNoCrash("a<,");
+
+ // No braced initializer here.
+ verifyFormat("void f() {\n"
+ " struct Dummy {};\n"
+ " f(v);\n"
+ "}");
}
TEST_F(FormatTest, PullTrivialFunctionDefinitionsIntoSingleLine) {
OpenPOWER on IntegriCloud