diff --git a/src/uml/class_diagram_visitor.cc b/src/uml/class_diagram_visitor.cc index 3ce001af..c3deed87 100644 --- a/src/uml/class_diagram_visitor.cc +++ b/src/uml/class_diagram_visitor.cc @@ -193,6 +193,12 @@ void tu_visitor::process_enum_declaration(const cppast::cpp_enum &enm) enum_ e; e.name = cx::util::full_name(ctx.namespace_, enm); + if (enm.comment().has_value()) + e.decorators = decorators::parse(enm.comment().value()); + + if (e.skip()) + return; + // Process enum documentation comment if (enm.comment().has_value()) e.decorators = decorators::parse(enm.comment().value()); @@ -230,6 +236,12 @@ void tu_visitor::process_class_declaration(const cppast::cpp_class &cls, c.is_struct = cls.class_kind() == cppast::cpp_class_kind::struct_t; c.name = cx::util::full_name(ctx.namespace_, cls); + if (cls.comment().has_value()) + c.decorators = decorators::parse(cls.comment().value()); + + if (c.skip()) + return; + cppast::cpp_access_specifier_kind last_access_specifier = cppast::cpp_access_specifier_kind::cpp_private; diff --git a/tests/test_cases.cc b/tests/test_cases.cc index 74d04769..6a51ca17 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -132,6 +132,7 @@ using namespace clanguml::test::matchers; #include "t00026/test_case.h" #include "t00027/test_case.h" #include "t00028/test_case.h" +#include "t00029/test_case.h" // // Sequence diagram tests diff --git a/tests/test_cases.h b/tests/test_cases.h index 6c7d89ef..2d5bd79a 100644 --- a/tests/test_cases.h +++ b/tests/test_cases.h @@ -170,8 +170,7 @@ struct AliasMatcher { } } - throw std::runtime_error(fmt::format( - "Cannot find alias {} in {}", name, fmt::join(puml, "\n"))); + return "__INVALID__ALIAS__"; } const std::vector puml;