Skip to content

TypeSystem: silence a number of uncovered switch warnings #1946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2020
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
36 changes: 36 additions & 0 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4425,6 +4425,9 @@ static SwiftASTContext::TypeOrDecl DeclToTypeOrDecl(swift::ASTContext *ast,
case swift::DeclKind::Accessor:
case swift::DeclKind::PoundDiagnostic:
break;

default:
break;
}
}
return CompilerType();
Expand Down Expand Up @@ -5561,6 +5564,9 @@ SwiftASTContext::GetTypeInfo(opaque_compiler_type_t type,

case swift::TypeKind::SILToken:
break;

default:
break;
}
return swift_flags;
}
Expand Down Expand Up @@ -5658,6 +5664,9 @@ lldb::TypeClass SwiftASTContext::GetTypeClass(opaque_compiler_type_t type) {

case swift::TypeKind::SILToken:
break;

default:
break;
}

return lldb::eTypeClassOther;
Expand Down Expand Up @@ -6164,6 +6173,9 @@ lldb::Encoding SwiftASTContext::GetEncoding(opaque_compiler_type_t type,

case swift::TypeKind::SILToken:
break;

default:
break;
}
count = 0;
return lldb::eEncodingInvalid;
Expand Down Expand Up @@ -6250,6 +6262,9 @@ lldb::Format SwiftASTContext::GetFormat(opaque_compiler_type_t type) {

case swift::TypeKind::SILToken:
break;

default:
break;
}
// We don't know hot to display this type.
return lldb::eFormatBytes;
Expand Down Expand Up @@ -6362,6 +6377,9 @@ uint32_t SwiftASTContext::GetNumChildren(opaque_compiler_type_t type,

case swift::TypeKind::SILToken:
break;

default:
break;
}

return num_children;
Expand Down Expand Up @@ -6477,6 +6495,9 @@ uint32_t SwiftASTContext::GetNumFields(opaque_compiler_type_t type) {

case swift::TypeKind::SILToken:
break;

default:
break;
}

return count;
Expand Down Expand Up @@ -6762,6 +6783,9 @@ CompilerType SwiftASTContext::GetFieldAtIndex(opaque_compiler_type_t type,

case swift::TypeKind::SILToken:
break;

default:
break;
}

return CompilerType();
Expand Down Expand Up @@ -6838,6 +6862,9 @@ uint32_t SwiftASTContext::GetNumPointeeChildren(opaque_compiler_type_t type) {

case swift::TypeKind::SILToken:
break;

default:
break;
}

return 0;
Expand Down Expand Up @@ -7201,6 +7228,9 @@ CompilerType SwiftASTContext::GetChildCompilerTypeAtIndex(

case swift::TypeKind::SILToken:
break;

default:
break;
}
return CompilerType();
}
Expand Down Expand Up @@ -7417,6 +7447,9 @@ size_t SwiftASTContext::GetIndexOfChildMemberWithName(

case swift::TypeKind::SILToken:
break;

default:
break;
}
}
return 0;
Expand Down Expand Up @@ -7801,6 +7834,9 @@ bool SwiftASTContext::DumpTypeValue(

case swift::TypeKind::SILToken:
break;

default:
break;
}

return 0;
Expand Down