diff --git a/tool/main.cpp b/tool/main.cpp index 6c3cbef..afcbab3 100644 --- a/tool/main.cpp +++ b/tool/main.cpp @@ -30,7 +30,11 @@ void print_error(const std::string& msg) void print_entity(std::ostream& out, const cppast::cpp_entity& e) { // 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 << ""; + out << " (" << cppast::to_string(e.kind()) << ")"; // print whether or not it is a definition if (cppast::is_definition(e))