Skip to content

Commit 8cae17c

Browse files
author
Sasha Krassovsky
committed
Fix warnings in Sema
1 parent 63a81fd commit 8cae17c

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,7 @@ getContextualNilDiagnostic(ContextualTypePurpose CTP) {
18871887
case CTP_SubscriptAssignSource:
18881888
return diag::cannot_convert_subscript_assign_nil;
18891889
}
1890+
llvm_unreachable("Unhandled ContextualTypePurpose in switch");
18901891
}
18911892

18921893
bool ContextualFailure::diagnoseConversionToNil() const {

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,6 +2129,7 @@ static ConstraintFix *fixPropertyWrapperFailure(
21292129
return UseWrappedValue::create(cs, decl, baseTy, toType.getValueOr(type),
21302130
locator);
21312131
}
2132+
llvm_unreachable("Unhandled Fix type in switch");
21322133
};
21332134

21342135
if (auto storageWrapper = cs.getStorageWrapperInformation(resolvedOverload)) {

lib/Sema/TypeCheckStorage.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,6 +1818,7 @@ SynthesizeAccessorRequest::evaluate(Evaluator &evaluator,
18181818
#include "swift/AST/AccessorKinds.def"
18191819
llvm_unreachable("not an opaque accessor");
18201820
}
1821+
llvm_unreachable("Unhandled AccessorKind in switch");
18211822
}
18221823

18231824
llvm::Expected<bool>

0 commit comments

Comments
 (0)