diff options
author | Daniel Jasper <djasper@google.com> | 2015-01-19 11:49:32 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-01-19 11:49:32 +0000 |
commit | 9b79efb51f9ec9d6847a7373092c5006da2eeae1 (patch) | |
tree | 2a576569838f7df817dd0f64a316b22f327eb9a8 /clang/unittests/Format | |
parent | 6c6e589c1f09e519aaca5d7161801dd7d6fd8960 (diff) | |
download | bcm5719-llvm-9b79efb51f9ec9d6847a7373092c5006da2eeae1.tar.gz bcm5719-llvm-9b79efb51f9ec9d6847a7373092c5006da2eeae1.zip |
clang-format: Fix crasher on weird comments.
Crashing input:
/\
/ comment
llvm-svn: 226454
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index f267c94b6d3..615b46a1d4e 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1035,6 +1035,9 @@ TEST_F(FormatTest, UnderstandsSingleLineComments) { " // spanning two lines\n" " x + 3) {\n" "}")); + + verifyNoCrash("/\\\n/"); + verifyNoCrash("/\\\n* */"); } TEST_F(FormatTest, KeepsParameterWithTrailingCommentsOnTheirOwnLine) { |