Skip to content

Commit f9d10ce

Browse files
committed
Swift: fix DeclTranslator.cpp compile errors
1 parent 8e9b433 commit f9d10ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

swift/extractor/translators/DeclTranslator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ void DeclTranslator::fillOperatorDecl(const swift::OperatorDecl& decl,
269269

270270
void DeclTranslator::fillTypeDecl(const swift::TypeDecl& decl, codeql::TypeDecl& entry) {
271271
entry.name = decl.getNameStr().str();
272-
for (auto& typeLoc : decl.getInherited()) {
273-
if (auto type = typeLoc.getType()) {
272+
for (auto& inherited : decl.getInherited().getEntries()) {
273+
if (auto type = inherited.getType()) {
274274
entry.inherited_types.push_back(dispatcher.fetchLabel(type));
275275
}
276276
}
@@ -289,7 +289,7 @@ void DeclTranslator::fillIterableDeclContext(const swift::IterableDeclContext& d
289289

290290
void DeclTranslator::fillVarDecl(const swift::VarDecl& decl, codeql::VarDecl& entry) {
291291
entry.name = decl.getNameStr().str();
292-
entry.type = dispatcher.fetchLabel(decl.getType());
292+
entry.type = dispatcher.fetchLabel(decl.getTypeInContext());
293293
entry.parent_pattern = dispatcher.fetchOptionalLabel(decl.getParentPattern());
294294
entry.parent_initializer = dispatcher.fetchOptionalLabel(decl.getParentInitializer());
295295
if (decl.hasAttachedPropertyWrapper()) {

0 commit comments

Comments
 (0)