summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2019-04-06 23:10:11 +0000
committerOwen Pan <owenpiano@gmail.com>2019-04-06 23:10:11 +0000
commitfca07890a9918e9814a7c3d6a39ea3a91789b546 (patch)
tree6f4ca2aaf7713a9bdb68936ad4855bc577c60d28 /clang/unittests/Format/FormatTest.cpp
parentbcb29cb7486280197853d1c07ec847feac7c98c5 (diff)
downloadbcm5719-llvm-fca07890a9918e9814a7c3d6a39ea3a91789b546.tar.gz
bcm5719-llvm-fca07890a9918e9814a7c3d6a39ea3a91789b546.zip
[clang-format] Fix Bug 41407
Differential Revision: https://reviews.llvm.org/D60359 llvm-svn: 357851
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 110d60a5a86..dc2512a9e27 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -11946,6 +11946,13 @@ TEST_F(FormatTest, ConstructorInitializerIndentWidth) {
"bool smaller = 1 < bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);",
Style);
+
+ Style.BreakConstructorInitializers = FormatStyle::BCIS_AfterColon;
+ verifyFormat(
+ "SomeClass::Constructor() :\n"
+ "aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa),\n"
+ "aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa) {}",
+ Style);
}
TEST_F(FormatTest, BreakConstructorInitializersBeforeComma) {
OpenPOWER on IntegriCloud