diff --git a/lib/Sema/CSDiagnostics.cpp b/lib/Sema/CSDiagnostics.cpp index 3949ae2b4981b..7dfa649ff42ec 100644 --- a/lib/Sema/CSDiagnostics.cpp +++ b/lib/Sema/CSDiagnostics.cpp @@ -680,7 +680,7 @@ bool MissingConformanceFailure::diagnoseAsAmbiguousOperatorRef() { // about missing conformance just in case. auto operatorID = name.getIdentifier(); - auto *applyExpr = cast_or_null(findParentExpr(anchor)); + auto *applyExpr = cast(findParentExpr(anchor)); if (auto *binaryOp = dyn_cast(applyExpr)) { auto lhsType = getType(binaryOp->getArg()->getElement(0)); auto rhsType = getType(binaryOp->getArg()->getElement(1)); diff --git a/lib/Sema/ConstraintSystem.cpp b/lib/Sema/ConstraintSystem.cpp index 53395f6e4e7e6..b8c658435bef4 100644 --- a/lib/Sema/ConstraintSystem.cpp +++ b/lib/Sema/ConstraintSystem.cpp @@ -2425,7 +2425,7 @@ bool ConstraintSystem::salvage(SmallVectorImpl &viable, Expr *expr) { // Before removing any "fixed" solutions, let's check // if ambiguity is caused by fixes and diagnose if possible. - if (diagnoseAmbiguityWithFixes(expr, viable)) + if (diagnoseAmbiguityWithFixes(viable)) return true; // FIXME: If we were able to actually fix things along the way, @@ -2529,7 +2529,7 @@ static void diagnoseOperatorAmbiguity(ConstraintSystem &cs, } bool ConstraintSystem::diagnoseAmbiguityWithFixes( - Expr *expr, ArrayRef solutions) { + ArrayRef solutions) { if (solutions.empty()) return false; diff --git a/lib/Sema/ConstraintSystem.h b/lib/Sema/ConstraintSystem.h index c5aa1c80a2873..5ba8e83f2c095 100644 --- a/lib/Sema/ConstraintSystem.h +++ b/lib/Sema/ConstraintSystem.h @@ -2108,7 +2108,7 @@ class ConstraintSystem { void diagnoseFailureForExpr(Expr *expr); bool diagnoseAmbiguity(Expr *expr, ArrayRef solutions); - bool diagnoseAmbiguityWithFixes(Expr *expr, ArrayRef solutions); + bool diagnoseAmbiguityWithFixes(ArrayRef solutions); /// Give the deprecation warning for referring to a global function /// when there's a method from a conditional conformance in a smaller/closer