better descriptions for named record constructors

This commit is contained in:
Vern Paxson 2021-06-02 15:57:25 -07:00
parent a6480e5eec
commit 7a96d2fa61
10 changed files with 772 additions and 760 deletions

View file

@ -3375,9 +3375,21 @@ bool RecordConstructorExpr::IsPure() const
void RecordConstructorExpr::ExprDescribe(ODesc* d) const
{
d->Add("[");
op->Describe(d);
d->Add("]");
auto& tn = type->GetName();
if ( tn.size() > 0 )
{
d->Add(tn);
d->Add("(");
op->Describe(d);
d->Add(")");
}
else
{
d->Add("[");
op->Describe(d);
d->Add("]");
}
}
TraversalCode RecordConstructorExpr::Traverse(TraversalCallback* cb) const