mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: fix DeclTranslator.cpp compile errors
This commit is contained in:
@@ -269,8 +269,8 @@ void DeclTranslator::fillOperatorDecl(const swift::OperatorDecl& decl,
|
||||
|
||||
void DeclTranslator::fillTypeDecl(const swift::TypeDecl& decl, codeql::TypeDecl& entry) {
|
||||
entry.name = decl.getNameStr().str();
|
||||
for (auto& typeLoc : decl.getInherited()) {
|
||||
if (auto type = typeLoc.getType()) {
|
||||
for (auto& inherited : decl.getInherited().getEntries()) {
|
||||
if (auto type = inherited.getType()) {
|
||||
entry.inherited_types.push_back(dispatcher.fetchLabel(type));
|
||||
}
|
||||
}
|
||||
@@ -289,7 +289,7 @@ void DeclTranslator::fillIterableDeclContext(const swift::IterableDeclContext& d
|
||||
|
||||
void DeclTranslator::fillVarDecl(const swift::VarDecl& decl, codeql::VarDecl& entry) {
|
||||
entry.name = decl.getNameStr().str();
|
||||
entry.type = dispatcher.fetchLabel(decl.getType());
|
||||
entry.type = dispatcher.fetchLabel(decl.getTypeInContext());
|
||||
entry.parent_pattern = dispatcher.fetchOptionalLabel(decl.getParentPattern());
|
||||
entry.parent_initializer = dispatcher.fetchOptionalLabel(decl.getParentInitializer());
|
||||
if (decl.hasAttachedPropertyWrapper()) {
|
||||
|
||||
Reference in New Issue
Block a user