Register declarations as well
Will be overriden by definitions.
This commit is contained in:
parent
db0e649bf6
commit
cb9ad57e87
21 changed files with 98 additions and 43 deletions
|
|
@ -136,9 +136,12 @@ namespace cppast
|
|||
{
|
||||
function->body_ = body_kind;
|
||||
if (cppast::is_definition(body_kind))
|
||||
idx.register_entity(std::move(id), type_safe::cref(*function));
|
||||
idx.register_definition(std::move(id), type_safe::ref(*function));
|
||||
else
|
||||
{
|
||||
function->set_definition(id);
|
||||
idx.register_forward_declaration(std::move(id), type_safe::ref(*function));
|
||||
}
|
||||
return std::move(function);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue