[Clang] Fix a crash when encountering an ill-formed delimited UCN.
authorCorentin Jabot <corentinjabot@gmail.com>
Mon, 12 Dec 2022 23:26:13 +0000 (00:26 +0100)
committerCorentin Jabot <corentinjabot@gmail.com>
Tue, 3 Jan 2023 19:57:52 +0000 (20:57 +0100)
commit0d6b26b4d3e3991da16f5b7f53e397b0051e8598
treef4e524ee21a956afd8ba4f12caad867a8ab1c943
parenta315534e52fd5c534fadc1e62101543aaf1537a2
[Clang] Fix a crash when encountering an ill-formed delimited UCN.

\u<DIGIT>{...} was incorrectly parsed as a valid UCN instead
of emitting a diagnostic, causing an assertion failure.

Reviewed By: tahonermann

Differential Revision: https://reviews.llvm.org/D139889
clang/lib/Lex/Lexer.cpp
clang/test/Preprocessor/ucn-pp-identifier.c