Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion swift/extractor/translators/TypeTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ void TypeTranslator::fillAnyGenericType(const swift::AnyGenericType& type,
}

void TypeTranslator::fillType(const swift::TypeBase& type, codeql::Type& entry) {
entry.name = type.getString();
// Preserve the order as getCanonicalType() forces computation of the canonical type
// without which getString may crash sometimes
entry.canonical_type = dispatcher.fetchLabel(type.getCanonicalType());
entry.name = type.getString();
}

void TypeTranslator::fillArchetypeType(const swift::ArchetypeType& type, ArchetypeType& entry) {
Expand Down