Fix issue with using declarations
This commit is contained in:
parent
1c973cb0fa
commit
455af67837
2 changed files with 4 additions and 1 deletions
|
|
@ -174,7 +174,7 @@ namespace
|
|||
auto loc = source_location::make_file(path); // line number won't help
|
||||
auto text = detail::cxstring(clang_getDiagnosticSpelling(diag));
|
||||
|
||||
logger.log("libclang parser", diagnostic{text.c_str(), loc, sev.value()});
|
||||
logger.log("libclang", diagnostic{text.c_str(), loc, sev.value()});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,12 +131,15 @@ namespace
|
|||
std::vector<cpp_entity_id> result;
|
||||
detail::visit_children(cur,
|
||||
[&](const CXCursor& child) {
|
||||
if (!result.empty())
|
||||
return;
|
||||
switch (clang_getCursorKind(child))
|
||||
{
|
||||
case CXCursor_TypeRef:
|
||||
case CXCursor_TemplateRef:
|
||||
case CXCursor_MemberRef:
|
||||
case CXCursor_VariableRef:
|
||||
case CXCursor_DeclRefExpr:
|
||||
{
|
||||
auto referenced = clang_getCursorReferenced(child);
|
||||
result.push_back(detail::get_entity_id(referenced));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue