From 5971c4a0a1bea3ff363aef588117a0b0f6010dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20M=C3=BCller?= Date: Tue, 18 Dec 2018 16:13:40 +0100 Subject: [PATCH] Print number of attributes in tool --- tool/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tool/main.cpp b/tool/main.cpp index 8ce0af8..30a4b5e 100644 --- a/tool/main.cpp +++ b/tool/main.cpp @@ -40,6 +40,10 @@ void print_entity(std::ostream& out, const cppast::cpp_entity& e) if (cppast::is_definition(e)) out << " [definition]"; + // print number of attributes + if (!e.attributes().empty()) + out << " [" << e.attributes().size() << " attribute(s)]"; + if (e.kind() == cppast::cpp_entity_kind::language_linkage_t) // no need to print additional information for language linkages out << '\n';