Properly handle anonymous entities in tool
This commit is contained in:
parent
455af67837
commit
da033cdebe
1 changed files with 5 additions and 1 deletions
|
|
@ -30,7 +30,11 @@ void print_error(const std::string& msg)
|
||||||
void print_entity(std::ostream& out, const cppast::cpp_entity& e)
|
void print_entity(std::ostream& out, const cppast::cpp_entity& e)
|
||||||
{
|
{
|
||||||
// print name and the kind of the entity
|
// print name and the kind of the entity
|
||||||
out << e.name() << " (" << cppast::to_string(e.kind()) << ")";
|
if (!e.name().empty())
|
||||||
|
out << e.name();
|
||||||
|
else
|
||||||
|
out << "<anonymous>";
|
||||||
|
out << " (" << cppast::to_string(e.kind()) << ")";
|
||||||
|
|
||||||
// print whether or not it is a definition
|
// print whether or not it is a definition
|
||||||
if (cppast::is_definition(e))
|
if (cppast::is_definition(e))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue