clang-format: Recognize lists ending in trailing commas correctly.
Previously, this did not look through trailing comments leading to a few
formatting oddities.
llvm-svn: 205843
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 975f9c6..5adc0d5 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5129,13 +5129,14 @@
" 1, 1, 1, 1, 1, 1, 1, 1,\n"
"};",
getLLVMStyleWithColumns(39));
- verifyFormat("vector<int> x = {1, 1, 1, 1,\n"
- " 1, 1, 1, 1, //\n"
+ verifyFormat("vector<int> x = {\n"
+ " 1, 1, 1, 1, 1, 1, 1, 1, //\n"
"};",
getLLVMStyleWithColumns(39));
- verifyFormat("vector<int> x = {1, 1, 1, 1,\n"
- " 1, 1, 1, 1,\n"
- " /**/ /**/};",
+ verifyFormat("vector<int> x = {\n"
+ " 1, 1, 1, 1, 1, 1, 1, 1,\n"
+ " /**/ /**/\n"
+ "};",
getLLVMStyleWithColumns(39));
verifyFormat("return {{aaaaaaaaaaaaaaaaaaaaa},\n"
" {aaaaaaaaaaaaaaaaaaa},\n"