diff --git a/src/lib/data/Storage.cpp b/src/lib/data/Storage.cpp index bb2e422b..995576f6 100644 --- a/src/lib/data/Storage.cpp +++ b/src/lib/data/Storage.cpp @@ -883,13 +883,7 @@ Edge* Storage::addTypeEdge(Node* node, Edge::EdgeType edgeType, const ParseTypeU return nullptr; } - // FIXME: For some reason the TypeNameHierarchy is not always split up properly by the Parser. This might happen - // when a Type declaration is in a different file than it's usage, but this oberservation is not reliable. std::vector nameHierarchy = typeUsage.dataType.getTypeNameHierarchy(); - if (nameHierarchy.size() == 1 && nameHierarchy[0].find('<') == std::string::npos) - { - nameHierarchy = utility::splitToVector(nameHierarchy[0], "::"); - } Node* typeNode = addNodeHierarchy(Node::NODE_UNDEFINED_TYPE, nameHierarchy); if (!typeNode) diff --git a/src/lib/data/parser/cxx/utilityCxx.cpp b/src/lib/data/parser/cxx/utilityCxx.cpp index e4fd956f..e397e6b7 100644 --- a/src/lib/data/parser/cxx/utilityCxx.cpp +++ b/src/lib/data/parser/cxx/utilityCxx.cpp @@ -63,6 +63,12 @@ namespace utility { const clang::Type* type = qualType.getUnqualifiedType().getTypePtr(); + if (clang::isa(type)) // get the real type here + { + const clang::ElaboratedType* et = clang::dyn_cast(type); + type = et->getNamedType().getUnqualifiedType().getTypePtr(); + } + if (clang::isa(type)) { typeNameHerarchy = getDeclNameHierarchy(clang::dyn_cast(type)->getDecl());