8000 [lldb] Add missing case to switch and turn on -Werror=switch for Type… · swiftlang/llvm-project@df9ea01 · GitHub
[go: up one dir, main page]

Skip to content

Commit df9ea01

Browse files
[lldb] Add missing case to switch and turn on -Werror=switch for TypeSystemSwift (#10935)
1 parent fc349e9 commit df9ea01

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lldb/source/Plugins/TypeSystem/Swift/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ add_lldb_library(lldbPluginTypeSystemSwift PLUGIN
1313
LINK_COMPONENTS
1414
Support
1515
)
16+
17+
# Enforce synchronization between Swift compiler updates and LLDB via PR testing.
18+
check_cxx_compiler_flag("-Werror=switch" CXX_SUPPORTS_ERROR_SWITCH)
19+
if (CXX_SUPPORTS_ERROR_SWITCH)
20+
target_compile_options(lldbPluginTypeSystemSwift PRIVATE -Werror=switch)
21+
endif()

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4858,6 +4858,7 @@ static SwiftASTContext::TypeOrDecl DeclToTypeOrDecl(swift::Decl *decl) {
48584858
case swift::DeclKind::Module:
48594859
case swift::DeclKind::Missing:
48604860
case swift::DeclKind::MissingMember:
4861+
case swift::DeclKind::Using:
48614862
break;
48624863

48634864
case swift::DeclKind::InfixOperator:

0 commit comments

Comments
 (0)
0