Prevent infinite recursion during alias resolution #18

This commit is contained in:
Bartek Kryza
2022-03-05 22:10:27 +01:00
parent 2583661d31
commit 17de8b7ded
3 changed files with 15 additions and 3 deletions

View File

@@ -88,6 +88,10 @@ std::string ns(const cppast::cpp_entity &e)
}
it = it.value().parent();
}
if (res.empty())
return "";
std::reverse(res.begin(), res.end());
return fmt::format("{}", fmt::join(res, "::"));