Added typedef and typealias test

This commit is contained in:
Bartek Kryza
2021-03-21 18:36:51 +01:00
parent 7001c0870e
commit 06256f0456
7 changed files with 120 additions and 4 deletions

View File

@@ -211,6 +211,11 @@ public:
return clang_getCXXAccessSpecifier(m_cursor);
}
cx::type underlying_type() const
{
return clang_getTypedefDeclUnderlyingType(m_cursor);
}
int template_argument_count() const
{
return clang_Cursor_getNumTemplateArguments(m_cursor);

View File

@@ -599,8 +599,11 @@ enum CXChildVisitResult process_field(
m.is_static = cursor.is_static();
spdlog::debug("Adding member {} {}::{} {}, {}, {}", m.type, parent->name,
cursor.spelling(), t, tr, tr.type_declaration());
spdlog::debug(
"Adding member {} {}::{} "
"\n\tCURSOR={}\n\tTYPE={}\n\tTYPEDECL={}\n\tUNDERLYINGTYPE={}",
m.type, parent->name, cursor.spelling(), cursor, t,
tr.type_declaration(), tr.type_declaration().underlying_type());
if (tr.is_unexposed()) {
added_relation_to_instantiation =

View File

@@ -91,8 +91,8 @@ std::string ns_relative(
std::string unqualify(const std::string &s)
{
auto toks = clanguml::util::split(s, " ");
const std::vector<std::string> qualifiers = {
"static", "const", "volatile", "register", "mutable", "struct", "enum"};
const std::vector<std::string> qualifiers = {"static", "const", "volatile",
"register", "constexpr", "mutable", "struct", "enum"};
toks.erase(toks.begin(),
std::find_if(toks.begin(), toks.end(), [&qualifiers](const auto &t) {