diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index 97259946..d2a0eb82 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -1867,10 +1867,6 @@ void translation_unit_visitor:: static_cast( targ.type().value()); - std::string nnn{"empty"}; - if (parent) - nnn = (*parent)->name(); - auto [tinst_ns, tinst_name] = cx::util::split_ns(tinst.full_name(false)); diff --git a/tests/t00014/test_case.h b/tests/t00014/test_case.h index e7dc0533..7c24ace2 100644 --- a/tests/t00014/test_case.h +++ b/tests/t00014/test_case.h @@ -47,6 +47,21 @@ TEST_CASE("t00014", "[test-case][class]") REQUIRE_THAT(puml, IsClassTemplate("A", "bool,std::string")); REQUIRE_THAT(puml, IsClass(_A("B"))); + REQUIRE_THAT(puml, IsField("bapair", "PairPairBA")); + REQUIRE_THAT(puml, IsField("abool", "APtr")); + REQUIRE_THAT(puml, IsField("aboolfloat", "AAPtr")); + REQUIRE_THAT(puml, IsField("afloat", "ASharedPtr")); + REQUIRE_THAT(puml, IsField("boolstring", "A")); + REQUIRE_THAT(puml, IsField("floatstring", "AStringPtr")); + REQUIRE_THAT(puml, IsField("intstring", "AIntString")); + REQUIRE_THAT(puml, IsField("stringstring", "AStringString")); + REQUIRE_THAT(puml, IsField("bstringstring", "BStringString")); + + REQUIRE_THAT(puml, IsField("bs", "BVector")); + + REQUIRE_THAT(puml, IsField("cb", "GeneralCallback")); + REQUIRE_THAT(puml, IsField("vcb", "VoidCallback")); + REQUIRE_THAT( puml, !IsClassTemplate("std::std::function", "void(T...,int),int)")); diff --git a/thirdparty/cppast b/thirdparty/cppast index 6db9daf5..40c78194 160000 --- a/thirdparty/cppast +++ b/thirdparty/cppast @@ -1 +1 @@ -Subproject commit 6db9daf5d2fa161855f70ad3deea0873f53e195f +Subproject commit 40c7819463c403a6d6047c33652179c7fc068c72