[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 15 15:33:30 PDT 2025
================
@@ -1752,7 +1752,8 @@ enum class StringLiteralKind {
UTF8,
UTF16,
UTF32,
- Unevaluated
+ Unevaluated,
+ Binary
----------------
cor3ntin wrote:
Can you add a comment explaining this is for embed?
I'm sorry it took me a while to understand how this patch works.
(The reason is that this allows us to not "cast" to char in `getCodeUnitS()` - which is only used in C23 mode)
Maybe also add a comment in `getCodeUnitS` and/or `CheckC23ConstexprInitStringLiteral`
https://github.com/llvm/llvm-project/pull/127629
More information about the cfe-commits
mailing list