Fix libclang issue with USR, partial class template specialization and ref qualifiers
This commit is contained in:
parent
13d9ac6147
commit
bf35018bdf
1 changed files with 9 additions and 0 deletions
|
|
@ -23,6 +23,15 @@ cpp_entity_id detail::get_entity_id(const CXCursor& cur)
|
||||||
cxstring type_spelling(clang_getTypeSpelling(clang_getCursorResultType(cur)));
|
cxstring type_spelling(clang_getTypeSpelling(clang_getCursorResultType(cur)));
|
||||||
return cpp_entity_id(std::string(usr.c_str()) + type_spelling.c_str());
|
return cpp_entity_id(std::string(usr.c_str()) + type_spelling.c_str());
|
||||||
}
|
}
|
||||||
|
else if (clang_getCursorKind(cur) == CXCursor_ClassTemplatePartialSpecialization)
|
||||||
|
{
|
||||||
|
// libclang issue: templ<T()> vs templ<T() &>
|
||||||
|
// but identical USR
|
||||||
|
// same workaround: combine display name with usr
|
||||||
|
// (and hope this prevents all collisions...)
|
||||||
|
cxstring display_name(clang_getCursorDisplayName(cur));
|
||||||
|
return cpp_entity_id(std::string(usr.c_str()) + display_name.c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return cpp_entity_id(usr.c_str());
|
return cpp_entity_id(usr.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue