[all-commits] [llvm/llvm-project] 304e97: [Clang] Correctly handle $, @, and ` when represen...
cor3ntin via All-commits
all-commits at lists.llvm.org
Tue Jul 11 23:03:37 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 304e97469455b57f6496f68fef569eeaed3a2cd8
https://github.com/llvm/llvm-project/commit/304e97469455b57f6496f68fef569eeaed3a2cd8
Author: Corentin Jabot <corentinjabot at gmail.com>
Date: 2023-07-12 (Wed, 12 Jul 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticLexKinds.td
M clang/lib/Lex/Lexer.cpp
M clang/lib/Lex/LiteralSupport.cpp
M clang/test/Lexer/char-literal.cpp
M clang/test/Lexer/utf8-char-literal.cpp
M clang/test/Preprocessor/ucn-allowed-chars.c
M clang/test/Preprocessor/ucn-pp-identifier.c
Log Message:
-----------
[Clang] Correctly handle $, @, and ` when represented as UCN
This covers
* P2558R2 (C++, wg21.link/P2558)
* N2701 (C, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2701.htm)
* N3124 (C, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3124.pdf)
This patch
* Disallow representing $ as a UCN in all language mode, which did not
properly work (see GH62133), and which in made ill-formed in
C++ and C by P2558 and N3124 respectively
* Allow a UCN for any character in C2X, in string and character
literals
Fixes #62133
Reviewed By: #clang-language-wg, tahonermann
Differential Revision: https://reviews.llvm.org/D153621
More information about the All-commits
mailing list