clang-format: Fix corner case for brace alignment.
Before:
Constructor::Constructor()
: some_value{ //
aaaaaaa //
} {}
After:
Constructor::Constructor()
: some_value{ //
aaaaaaa //
} {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194204 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index fc6ef2b..00c684c 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -4543,6 +4543,11 @@
" T member = {arg1, arg2};\n"
"};",
NoSpaces);
+ verifyFormat("Constructor::Constructor()\n"
+ " : some_value{ //\n"
+ " aaaaaaa //\n"
+ " } {}",
+ NoSpaces);
}
TEST_F(FormatTest, FormatsBracedListsInColumnLayout) {