mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
sprinkle llvm_unreachable for covered switches (NFC)
Annotate the covered switches with `llvm_unreachable` to avoid the MSVC warning which does not recognise the covered switches. This allows us to avoid a spew of warnings.
This commit is contained in:
@@ -4077,6 +4077,7 @@ ConstraintSystem::isConversionEphemeral(ConversionRestrictionKind conversion,
|
||||
// parameter.
|
||||
return ConversionEphemeralness::NonEphemeral;
|
||||
}
|
||||
llvm_unreachable("invalid conversion restriction kind");
|
||||
}
|
||||
|
||||
Expr *ConstraintSystem::buildAutoClosureExpr(Expr *expr,
|
||||
@@ -4381,6 +4382,7 @@ bool SolutionApplicationTarget::contextualTypeIsOnlyAHint() const {
|
||||
case CTP_CannotFail:
|
||||
return false;
|
||||
}
|
||||
llvm_unreachable("invalid contextual type");
|
||||
}
|
||||
|
||||
/// Given a specific expression and the remnants of the failed constraint
|
||||
|
||||
Reference in New Issue
Block a user