diff --git a/src/libclang/parse_functions.cpp b/src/libclang/parse_functions.cpp index 4940cdd..68e661e 100644 --- a/src/libclang/parse_functions.cpp +++ b/src/libclang/parse_functions.cpp @@ -15,11 +15,14 @@ cpp_entity_id detail::get_entity_id(const CXCursor& cur) { cxstring usr(clang_getCursorUSR(cur)); DEBUG_ASSERT(!usr.empty(), detail::parse_error_handler{}, cur, "cannot create id for entity"); - if (clang_getCursorKind(cur) == CXCursor_FunctionTemplate) + if (clang_getCursorKind(cur) == CXCursor_FunctionTemplate + || clang_getCursorKind(cur) == CXCursor_ConversionFunction) { // we have a function template // combine return type with USR to ensure no ambiguity when SFINAE is applied there // (and hope this prevents all collisions...) + // same workaround also applies to conversion functions, + // there template arguments in the result are ignored cxstring type_spelling(clang_getTypeSpelling(clang_getCursorResultType(cur))); return cpp_entity_id(std::string(usr.c_str()) + type_spelling.c_str()); }