summaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTestComments.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
commit676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch)
tree02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /unittests/Format/FormatTestComments.cpp
parentc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff)
Diffstat (limited to 'unittests/Format/FormatTestComments.cpp')
-rw-r--r--unittests/Format/FormatTestComments.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestComments.cpp b/unittests/Format/FormatTestComments.cpp
index 2b07dedf67061..9f43677b70dfa 100644
--- a/unittests/Format/FormatTestComments.cpp
+++ b/unittests/Format/FormatTestComments.cpp
@@ -1254,6 +1254,12 @@ TEST_F(FormatTestComments, SplitsLongLinesInComments) {
" */",
getLLVMStyleWithColumns(20)));
+ // This reproduces a crashing bug where both adaptStartOfLine and
+ // getCommentSplit were trying to wrap after the "/**".
+ EXPECT_EQ("/** multilineblockcommentwithnowrapopportunity */",
+ format("/** multilineblockcommentwithnowrapopportunity */",
+ getLLVMStyleWithColumns(20)));
+
EXPECT_EQ("/*\n"
"\n"
"\n"