Improve auto-generated enum documentation.

The names of enum types are tracked so that variables holding a value
of a given enum type can generate a reference to it instead of just
listing the type as a generic "enum".
This commit is contained in:
Jon Siwek 2012-11-15 16:54:33 -06:00
parent 5508a5bb80
commit 9e49703087
6 changed files with 54 additions and 8 deletions

View file

@ -660,8 +660,16 @@ void ID::DescribeReSTShort(ODesc* d) const
d->Add(type->AsFuncType()->IsEvent() ? "event" : type_name(t));
break;
case TYPE_ENUM:
if ( is_type )
d->Add(type_name(t));
else
d->Add(type->AsEnumType()->Name().c_str());
break;
default:
d->Add(type_name(t));
break;
}
}