Fixed namespace namespace resolution
This commit is contained in:
@@ -549,8 +549,9 @@ void translation_unit_visitor::process_class_bases(
|
|||||||
class_parent cp;
|
class_parent cp;
|
||||||
auto base_ns = common::model::namespace_{
|
auto base_ns = common::model::namespace_{
|
||||||
cx::util::ns(base.type(), ctx.entity_index())};
|
cx::util::ns(base.type(), ctx.entity_index())};
|
||||||
base_ns = base_ns | base.name();
|
base_ns = base_ns | common::model::namespace_{base.name()}.name();
|
||||||
cp.set_name(base_ns.to_string());
|
cp.set_name(
|
||||||
|
base_ns.relative_to(ctx.config().using_namespace()).to_string());
|
||||||
cp.is_virtual(base.is_virtual());
|
cp.is_virtual(base.is_virtual());
|
||||||
|
|
||||||
switch (base.access_specifier()) {
|
switch (base.access_specifier()) {
|
||||||
|
|||||||
@@ -125,7 +125,9 @@ std::string ns(const cppast::cpp_entity &e)
|
|||||||
auto it = e.parent();
|
auto it = e.parent();
|
||||||
while (it) {
|
while (it) {
|
||||||
if (it.value().kind() == cppast::cpp_entity_kind::namespace_t) {
|
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());
|
res.push_back(it.value().name());
|
||||||
}
|
}
|
||||||
it = it.value().parent();
|
it = it.value().parent();
|
||||||
|
|||||||
Reference in New Issue
Block a user