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:
Saleem Abdulrasool
2020-05-07 11:04:17 -07:00
parent fe9751f988
commit 09975d1253
27 changed files with 40 additions and 0 deletions

View File

@@ -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