[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 4 11:22:01 PDT 2022
hokein accepted this revision.
hokein added a comment.
Thanks! I believe it fixes a long tail crash.
================
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.
----------------
nit: I'd probably use a clang lit test
```
auto nocrash = L"\N";
```
but up to you.
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