summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 4072fef2e0f..371fa0f3d22 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6368,6 +6368,12 @@ TEST_F(FormatTest, FormatsBracedListsInColumnLayout) {
" /**/ /**/};",
getLLVMStyleWithColumns(39));
+ // Trailing comment in the first line.
+ verifyFormat("vector<int> iiiiiiiiiiiiiii = { //\n"
+ " 1111111111, 2222222222, 33333333333, 4444444444, //\n"
+ " 111111111, 222222222, 3333333333, 444444444, //\n"
+ " 11111111, 22222222, 333333333, 44444444};");
+
// With nested lists, we should either format one item per line or all nested
// lists one on line.
// FIXME: For some nested lists, we can do better.
OpenPOWER on IntegriCloud