Reduce special-casing of parameters in ParamOrArgSave. (#3001)

I think this is a simpler and more efficient way of achieving the same
end result.
This commit is contained in:
Jon Ross-Perkins
2023-07-21 01:08:33 +00:00
committed by GitHub
parent 0594a1aac7
commit e51f971bce
3 changed files with 7 additions and 17 deletions
@@ -33,9 +33,8 @@ auto SemanticsHandleStructFieldType(SemanticsContext& context,
auto [name_node, name_id] =
context.node_stack().PopWithParseNode<ParseNodeKind::Name>();
context.AddNode(
SemanticsNode::StructTypeField::Make(name_node, cast_type_id, name_id));
context.node_stack().Push(parse_node);
context.AddNodeAndPush(parse_node, SemanticsNode::StructTypeField::Make(
name_node, cast_type_id, name_id));
return true;
}