Inline TypeChecker::diagnoseInlinableLocalType

This commit is contained in:
Robert Widmann
2019-11-05 21:38:39 -08:00
parent 6f7a8445bc
commit f27916b76c
3 changed files with 6 additions and 14 deletions

View File

@@ -84,17 +84,6 @@ TypeChecker::getFragileFunctionKind(const DeclContext *DC) {
llvm_unreachable("Context is not nested inside a fragile function");
}
void TypeChecker::diagnoseInlinableLocalType(const NominalTypeDecl *NTD) {
auto *DC = NTD->getDeclContext();
auto expansion = DC->getResilienceExpansion();
if (expansion == ResilienceExpansion::Minimal) {
auto kind = getFragileFunctionKind(DC);
diagnose(NTD, diag::local_type_in_inlinable_function,
NTD->getFullName(),
static_cast<unsigned>(kind.first));
}
}
/// A uniquely-typed boolean to reduce the chances of accidentally inverting
/// a check.
enum class DowngradeToWarning: bool {