summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-11-07 14:02:28 +0000
committerDaniel Jasper <djasper@google.com>2013-11-07 14:02:28 +0000
commit6b6e7c37eac2bd35a897ba8d161584e5511031a7 (patch)
treea34e389c1d4c617da10f8757b5b7ef92aa949fe8 /clang/unittests/Format/FormatTest.cpp
parent29c3b55897fc3986201d2f06a728447a29a2520e (diff)
downloadbcm5719-llvm-6b6e7c37eac2bd35a897ba8d161584e5511031a7.tar.gz
bcm5719-llvm-6b6e7c37eac2bd35a897ba8d161584e5511031a7.zip
clang-format: Fix corner case for brace alignment.
Before: Constructor::Constructor() : some_value{ // aaaaaaa // } {} After: Constructor::Constructor() : some_value{ // aaaaaaa // } {} llvm-svn: 194204
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index fc6ef2bb5ec..00c684cc401 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4543,6 +4543,11 @@ TEST_F(FormatTest, LayoutCxx11ConstructorBraceInitializers) {
" T member = {arg1, arg2};\n"
"};",
NoSpaces);
+ verifyFormat("Constructor::Constructor()\n"
+ " : some_value{ //\n"
+ " aaaaaaa //\n"
+ " } {}",
+ NoSpaces);
}
TEST_F(FormatTest, FormatsBracedListsInColumnLayout) {
OpenPOWER on IntegriCloud