Fixed dependency generation for template specializations
This commit is contained in:
@@ -38,5 +38,13 @@ std::string type::instantiation_template() const
|
||||
|
||||
return cur.fully_qualified();
|
||||
}
|
||||
|
||||
bool type::is_template_instantiation() const
|
||||
{
|
||||
auto s = spelling();
|
||||
auto it = s.find('<');
|
||||
return it != std::string::npos &&
|
||||
referenced().type_declaration().kind() != CXCursor_ClassTemplate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,12 +205,7 @@ public:
|
||||
return clang_Type_getCXXRefQualifier(m_type);
|
||||
}
|
||||
|
||||
bool is_template_instantiation() const
|
||||
{
|
||||
auto s = spelling();
|
||||
auto it = s.find('<');
|
||||
return it != std::string::npos;
|
||||
}
|
||||
bool is_template_instantiation() const;
|
||||
|
||||
std::string instantiation_template() const;
|
||||
|
||||
@@ -221,18 +216,7 @@ public:
|
||||
*/
|
||||
std::string unqualified() const
|
||||
{
|
||||
auto toks = clanguml::util::split(spelling(), " ");
|
||||
const std::vector<std::string> qualifiers = {
|
||||
"static", "const", "volatile", "register", "mutable"};
|
||||
|
||||
toks.erase(toks.begin(),
|
||||
std::find_if(
|
||||
toks.begin(), toks.end(), [&qualifiers](const auto &t) {
|
||||
return std::count(
|
||||
qualifiers.begin(), qualifiers.end(), t) == 0;
|
||||
}));
|
||||
|
||||
return fmt::format("{}", fmt::join(toks, " "));
|
||||
return clanguml::util::unqualify(spelling());
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user