diff options
author | Krasimir Georgiev <krasimir@google.com> | 2017-08-24 16:41:10 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2017-08-24 16:41:10 +0000 |
commit | 33bd85240852c1a26fe08908c0a11febbb819ed2 (patch) | |
tree | de2d76817d778ff9709488fde92d0114011bf0f7 /clang/unittests/Format/FormatTestComments.cpp | |
parent | 5076511ed6bdf5b5e2a84b6bef9610fd9a25aed1 (diff) | |
download | bcm5719-llvm-33bd85240852c1a26fe08908c0a11febbb819ed2.tar.gz bcm5719-llvm-33bd85240852c1a26fe08908c0a11febbb819ed2.zip |
[clang-format] Emit absolute splits before lines for comments, try 2
Summary:
This recommits https://reviews.llvm.org/D36956 with an update to the added test
case to not use raw string literals, since this makes gcc unhappy.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D37109
llvm-svn: 311672
Diffstat (limited to 'clang/unittests/Format/FormatTestComments.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestComments.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestComments.cpp b/clang/unittests/Format/FormatTestComments.cpp index 600132ec4b8..c8ebebc58ad 100644 --- a/clang/unittests/Format/FormatTestComments.cpp +++ b/clang/unittests/Format/FormatTestComments.cpp @@ -2787,6 +2787,24 @@ TEST_F(FormatTestComments, AlignsBlockCommentDecorations) { "* long */", getLLVMStyleWithColumns(20))); } + +TEST_F(FormatTestComments, NoCrush_Bug34236) { + // This is a test case from a crasher reported in: + // https://bugs.llvm.org/show_bug.cgi?id=34236 + // Temporarily disable formatting for readability. + // clang-format off + EXPECT_EQ( +"/* */ /*\n" +" * a\n" +" * b c\n" +" * d*/", + format( +"/* */ /*\n" +" * a b\n" +" * c d*/", + getLLVMStyleWithColumns(80))); + // clang-format on +} } // end namespace } // end namespace format } // end namespace clang |