Fixed nested anonymous namespace regression

This commit is contained in:
Bartek Kryza
2023-03-04 11:51:52 +01:00
parent bad78c0c7a
commit d4d749ae34
3 changed files with 20 additions and 34 deletions

View File

@@ -43,23 +43,6 @@ model::access_t access_specifier_to_access_t(
return access;
}
std::optional<clanguml::common::model::namespace_> get_enclosing_namespace(
const clang::DeclContext *decl)
{
if (!decl->getEnclosingNamespaceContext()->isNamespace())
return {};
const auto *namespace_declaration =
clang::cast<clang::NamespaceDecl>(decl->getEnclosingNamespaceContext());
if (namespace_declaration == nullptr) {
return {};
}
return clanguml::common::model::namespace_{
common::get_qualified_name(*namespace_declaration)};
}
model::namespace_ get_tag_namespace(const clang::TagDecl &declaration)
{
model::namespace_ ns;