mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 06:44:46 +01:00
Model the return slot as an output parameter (#4432)
Also fix `Param` insts to have meaningful names in pretty-printing, to help clarify relationship with return slot.
This commit is contained in:
@@ -199,6 +199,7 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory {
|
||||
case RequirementImpls::Kind:
|
||||
case RequirementRewrite::Kind:
|
||||
case Return::Kind:
|
||||
case ReturnSlotPattern::Kind:
|
||||
case ReturnExpr::Kind:
|
||||
case StructTypeField::Kind:
|
||||
return ExprCategory::NotExpr;
|
||||
@@ -344,6 +345,7 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory {
|
||||
|
||||
case Deref::Kind:
|
||||
case VarStorage::Kind:
|
||||
case ReturnSlot::Kind:
|
||||
return ExprCategory::DurableRef;
|
||||
|
||||
case Temporary::Kind:
|
||||
|
||||
Reference in New Issue
Block a user