Fixed namespace namespace resolution

This commit is contained in:
Bartek Kryza
2022-03-17 00:55:19 +01:00
parent 331f3310ce
commit 7abada2f6b
2 changed files with 6 additions and 3 deletions

View File

@@ -125,7 +125,9 @@ std::string ns(const cppast::cpp_entity &e)
auto it = e.parent();
while (it) {
if (it.value().kind() == cppast::cpp_entity_kind::namespace_t) {
if (!it.value().name().empty())
const auto &ns =
static_cast<const cppast::cpp_namespace &>(it.value());
if (!ns.name().empty() && !ns.is_inline())
res.push_back(it.value().name());
}
it = it.value().parent();