All test cases passing
This commit is contained in:
@@ -52,10 +52,7 @@ template <> id_t to_id(const clang::CXXRecordDecl &declaration)
|
||||
|
||||
template <> id_t to_id(const clang::EnumType &t) { return to_id(*t.getDecl()); }
|
||||
|
||||
template <> id_t to_id(const clang::TemplateSpecializationType &t)
|
||||
{
|
||||
return t.getTemplateName().getAsTemplateDecl()->getID();
|
||||
}
|
||||
// template <> id_t to_id(const clang::TemplateSpecializationType &t);
|
||||
|
||||
template <> id_t to_id(const std::filesystem::path &file)
|
||||
{
|
||||
|
||||
@@ -229,15 +229,25 @@ tvl::value_t subclass_filter::match(const diagram &d, const element &e) const
|
||||
if (!class_ref.has_value())
|
||||
return false;
|
||||
|
||||
LOG_DBG("====================== LOOKING FOR PARENTS OF {} ===========", fn);
|
||||
|
||||
parents.emplace(class_ref.value());
|
||||
|
||||
cd.get_parents(parents);
|
||||
|
||||
std::vector<std::string> parents_names;
|
||||
for (const auto p : parents)
|
||||
parents_names.push_back(p.get().full_name(false));
|
||||
|
||||
LOG_DBG("====================== FOUND PARENTS {} ==========",
|
||||
fmt::join(parents_names, ", "));
|
||||
|
||||
// Now check if any of the parents matches the roots specified in the
|
||||
// filter config
|
||||
for (const auto &root : roots_) {
|
||||
for (const auto &parent : parents) {
|
||||
auto full_name = parent.get().full_name(false);
|
||||
LOG_DBG("+++ COMPARING {} WITH {}", root, full_name);
|
||||
if (root == full_name)
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user