[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 4 11:30:30 PDT 2022
cor3ntin added inline comments.
================
Comment at: clang/unittests/Lex/LexerTest.cpp:665
+TEST_F(LexerTest, BrokenStringLiteral) {
+ const llvm::StringLiteral Source = R"cpp("\N")cpp";
+ // Make sure this isn't crashing.
----------------
hokein wrote:
> nit: I'd probably use a clang lit test
>
> ```
> auto nocrash = L"\N";
> ```
>
> but up to you.
Nah, this test is good. It could only crash at at the end of a file, which would be flacky at best with lit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135161/new/
https://reviews.llvm.org/D135161
More information about the cfe-commits
mailing list