mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 08:40:31 +00:00
Add support for character literals in macros (#6419)
Adding support for macros with character literals. Part of #6303
This commit is contained in:
1 parent
093700b274
commit
7be6538aec
3 files changed
+138
-1
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user