[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D135161#3839510 , @kadircet wrote: > i'll reland the fix without the test case, as it's clearly fixing one of the > codepaths that'll lead to a crash. it's only the test case that's crashing, > because i don't think there ar

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. i'll reland the fix without the test case, as it's clearly fixing one of the codepaths that'll lead to a crash. it's only the test case that's crashing, because i don't think there are certain test cases that exposed literal parser to invalid/incomplete input and i am

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. this is causing some crashes in buildbots, and i can't repro. reverting until i figure this out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135161/new/ https://reviews.llvm.org/D135161

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG36a200208fac: [clang][Lex] Fix a crash on malformed string literals (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-04 Thread Corentin Jabot via Phabricator via cfe-commits
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 l

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-04 Thread Haojian Wu via Phabricator via cfe-commits
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 cra

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. Yes, this looks reasonable. The additional warning is somewhat unfortunate, and we could avoid it, but at the same time i don't expect it would bother anyone given how unlikely the scenari

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-04 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added subscribers: cor3ntin, tahonermann. tahonermann added a reviewer: cor3ntin. tahonermann added a comment. I think this looks right, but it would be good for @cor3ntin to take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a project: All. kadircet requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D135161 Files: clang