diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-13 08:16:00 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-13 08:16:00 +0000 |
commit | 60c270764e2fe0d2e212dd859f9983fe0cc4eb66 (patch) | |
tree | d03b2c5771c7e2c1c0a1fc18867a7212f141ff6f /clang/unittests/Format/FormatTest.cpp | |
parent | 1b2f2f1b37795eef2bdb60cf889ec80b8dcb1380 (diff) | |
download | bcm5719-llvm-60c270764e2fe0d2e212dd859f9983fe0cc4eb66.tar.gz bcm5719-llvm-60c270764e2fe0d2e212dd859f9983fe0cc4eb66.zip |
clang-format: Support column layout with comment after {.
Before:
vector<int> iiiiiiiiiiiiiii = { //
1111111111, 2222222222, 33333333333, 4444444444, //
111111111, 222222222, 3333333333, 444444444, //
11111111, 22222222, 333333333, 44444444};
After:
vector<int> iiiiiiiiiiiiiii = { //
1111111111, 2222222222, 33333333333, 4444444444, //
111111111, 222222222, 3333333333, 444444444, //
11111111, 22222222, 333333333, 44444444};
llvm-svn: 237233
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 6 |
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. |