Add support for character literals in macros (#6419)

Adding support for macros with character literals.

Part of #6303
This commit is contained in:
Ivana Ivanovska
2025-11-24 13:54:17 +00:00
committed by GitHub
parent 093700b274
commit 7be6538aec
3 changed files with 138 additions and 1 deletions
+2 -1
View File
@@ -61,7 +61,8 @@ auto TryEvaluateMacroToConstant(Context& context, SemIR::LocId loc_id,
return nullptr;
}
if (isa<clang::StringLiteral>(result_expr)) {
if (isa<clang::StringLiteral>(result_expr) ||
isa<clang::CharacterLiteral>(result_expr)) {
return result_expr;
}