mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 06:31:03 +01:00
Add support for character literals in macros (#6419)
Adding support for macros with character literals. Part of #6303
This commit is contained in:
@@ -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