Steal comment of nested namespace

This commit is contained in:
Jonathan Müller 2017-12-22 10:54:37 +01:00
commit 755f251da9
10 changed files with 52 additions and 35 deletions

View file

@ -54,7 +54,7 @@ std::unique_ptr<cpp_entity> detail::parse_cpp_friend(const detail::parse_context
// for some reason libclang gives a type ref here
// we actually need a class decl cursor, so parse the referenced one
// this might be a definition, so give friend information to the parser
entity = parse_entity(context, referenced, cur);
entity = parse_entity(context, nullptr, referenced, cur);
comment = type_safe::copy(entity->comment()).value_or("");
}
}
@ -74,7 +74,7 @@ std::unique_ptr<cpp_entity> detail::parse_cpp_friend(const detail::parse_context
}
else if (clang_isDeclaration(kind))
{
entity = parse_entity(context, child, cur);
entity = parse_entity(context, nullptr, child, cur);
if (entity)
{
// steal comment