Fix SemIR printout for string literals in macros (#6440)

Added SemIR printout for string literals in macros in the tests. Removed
adding the inst in the imports to make the printout succeed.

Part of #6303
This commit is contained in:
Ivana Ivanovska
2025-11-28 16:34:25 +00:00
committed by GitHub
parent 2073594d8a
commit 108e39e095
2 changed files with 106 additions and 8 deletions
-1
View File
@@ -2284,7 +2284,6 @@ static auto MapConstant(Context& context, SemIR::LocId loc_id,
context.string_literal_values().Add(string_literal->getString());
auto inst_id =
MakeStringLiteral(context, Parse::StringLiteralId::None, string_id);
context.imports().push_back(inst_id);
return inst_id;
} else if (isa<clang::CXXNullPtrLiteralExpr>(expr)) {
auto type_id = MapNullptrType(context, loc_id).type_id;