We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a17cd9b + 80c4b73 commit a0e73eaCopy full SHA for a0e73ea
swift/extractor/translators/TypeTranslator.cpp
@@ -163,8 +163,10 @@ void TypeTranslator::fillAnyGenericType(const swift::AnyGenericType& type,
163
}
164
165
void TypeTranslator::fillType(const swift::TypeBase& type, codeql::Type& entry) {
166
- entry.name = type.getString();
+ // Preserve the order as getCanonicalType() forces computation of the canonical type
167
+ // without which getString may crash sometimes
168
entry.canonical_type = dispatcher.fetchLabel(type.getCanonicalType());
169
+ entry.name = type.getString();
170
171
172
void TypeTranslator::fillArchetypeType(const swift::ArchetypeType& type, ArchetypeType& entry) {
0 commit comments