Fixed class visitor continuation after inner class

This commit is contained in:
Bartek Kryza
2021-02-26 23:22:16 +01:00
parent 474f38c349
commit c1f4ecefbc
5 changed files with 13 additions and 4 deletions

View File

@@ -186,6 +186,7 @@ static enum CXChildVisitResult class_visitor(
ctx->ctx->d.classes.emplace_back(std::move(c));
});
ret = CXChildVisit_Continue;
break;
case CXCursor_EnumDecl:
if (!config.should_include(cursor.fully_qualified())) {

View File

@@ -50,7 +50,11 @@ std::vector<std::string> split(std::string str, std::string delimiter)
std::string ns_relative(
const std::vector<std::string> &namespaces, const std::string &n)
{
for (const auto &ns : namespaces) {
std::vector<std::string> namespaces_sorted{namespaces};
std::sort(namespaces_sorted.rbegin(), namespaces_sorted.rend());
for (const auto &ns : namespaces_sorted) {
if (ns.empty())
continue;