Use empty underlying type for aliases of anonymous types (#83)
Fixes #58
This commit is contained in:
parent
55221f1536
commit
a89ebcdf0a
2 changed files with 2 additions and 2 deletions
|
|
@ -637,7 +637,7 @@ std::unique_ptr<cpp_type> parse_type_impl(const detail::parse_context& context,
|
|||
case CXType_Typedef:
|
||||
return make_leave_type(cur, type, [&](std::string&& spelling) {
|
||||
auto decl = clang_getTypeDeclaration(type);
|
||||
if (remove_prefix(spelling, "(anonymous", false))
|
||||
if (detail::cxstring(clang_getCursorSpelling(decl)).empty())
|
||||
spelling = ""; // anonymous type
|
||||
return cpp_user_defined_type::build(
|
||||
cpp_type_ref(detail::get_entity_id(decl), std::move(spelling)));
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ typedef decltype(0) w;
|
|||
}
|
||||
else if (alias.name() == "v")
|
||||
{
|
||||
auto type = cpp_user_defined_type::build(cpp_type_ref(cpp_entity_id(""), "v"));
|
||||
auto type = cpp_user_defined_type::build(cpp_type_ref(cpp_entity_id(""), ""));
|
||||
REQUIRE(equal_types(idx, alias.underlying_type(), *type));
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue