diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-06 08:58:57 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-06 08:58:57 +0000 |
commit | 62c78f547471aaccf639f6ec32bf3e633bc4effd (patch) | |
tree | f42c54ca15d52ee643301e25b16e2184d43dfe09 /clang/unittests/Format | |
parent | 4d9ec17f1e7dd096c3b04222e169ddb00a7f353d (diff) | |
download | bcm5719-llvm-62c78f547471aaccf639f6ec32bf3e633bc4effd.tar.gz bcm5719-llvm-62c78f547471aaccf639f6ec32bf3e633bc4effd.zip |
clang-format: Prevent assertion discovered by fuzzer.
llvm-svn: 236578
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 762f92c042c..31befad6783 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1056,6 +1056,8 @@ TEST_F(FormatTest, UnderstandsSingleLineComments) { verifyNoCrash("/\\\n/"); verifyNoCrash("/\\\n* */"); + // The 0-character somehow makes the lexer return a proper comment. + verifyNoCrash(StringRef("/*\\\0\n/", 6)); } TEST_F(FormatTest, KeepsParameterWithTrailingCommentsOnTheirOwnLine) { |