diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestComments.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestComments.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestComments.cpp b/clang/unittests/Format/FormatTestComments.cpp index 79dc003ae85..70fa965adee 100644 --- a/clang/unittests/Format/FormatTestComments.cpp +++ b/clang/unittests/Format/FormatTestComments.cpp @@ -2803,6 +2803,23 @@ TEST_F(FormatTestComments, NonTrailingBlockComments) { " A = B;", getLLVMStyleWithColumns(40))); } + +TEST_F(FormatTestComments, NoCrush_Bug34236) { + // This is a test case from a crasher reported in: + // https://bugs.llvm.org/show_bug.cgi?id=34236 + EXPECT_EQ( + R"( +/* */ /* + * a + * b c + * d*/)", + format( + R"( +/* */ /* + * a b + * c d*/)", + getLLVMStyleWithColumns(80))); +} } // end namespace } // end namespace format } // end namespace clang |