clang-format: Prevent assertion discovered by fuzzer.
llvm-svn: 236578
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 762f92c..31befad 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -1056,6 +1056,8 @@
verifyNoCrash("/\\\n/");
verifyNoCrash("/\\\n* */");
+ // The 0-character somehow makes the lexer return a proper comment.
+ verifyNoCrash(StringRef("/*\\\0\n/", 6));
}
TEST_F(FormatTest, KeepsParameterWithTrailingCommentsOnTheirOwnLine) {