Skip to content

Commit 7a704b2

Browse files
committed
Fix MSVC control path warnings
1 parent 1680b92 commit 7a704b2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/Index/Index.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "swift/Basic/StringExtras.h"
2525
#include "llvm/ADT/APInt.h"
2626
#include "llvm/ADT/SmallVector.h"
27+
#include "llvm/Support/ErrorHandling.h"
2728
#include "llvm/Support/FileSystem.h"
2829

2930
using namespace swift;
@@ -570,6 +571,8 @@ bool IndexSwiftASTWalker::startEntity(Decl *D, IndexSymbol &Info) {
570571
EntitiesStack.push_back({D, Info.symInfo, Info.roles, {}});
571572
return true;
572573
}
574+
575+
llvm_unreachable("Unhandled IndexDataConsumer in switch.");
573576
}
574577

575578
bool IndexSwiftASTWalker::startEntityDecl(ValueDecl *D) {

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "llvm/ADT/ScopedHashTable.h"
3939
#include "llvm/ADT/SmallString.h"
4040
#include "llvm/Support/Compiler.h"
41+
#include "llvm/Support/ErrorHandling.h"
4142
#include "llvm/Support/SaveAndRestore.h"
4243

4344
#define DEBUG_TYPE "protocol-conformance-checking"
@@ -5482,6 +5483,8 @@ bool TypeChecker::useObjectiveCBridgeableConformancesOfArgs(
54825483
return anyUnsatisfied;
54835484
}
54845485
}
5486+
5487+
llvm_unreachable("Unhandled RequirementCheckResult in switch.");
54855488
}
54865489

54875490
void TypeChecker::useBridgedNSErrorConformances(DeclContext *dc, Type type) {

0 commit comments

Comments
 (0)