Skip to content

Commit 636e014

Browse files
committed
[Constraint system] Make sure to check NULL for getParameterList().
1 parent 60eb0fb commit 636e014

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5541,10 +5541,12 @@ bool ConstraintSystem::repairFailures(
55415541

55425542
if (auto overload = findSelectedOverloadFor(calleeLocator)) {
55435543
if (auto *decl = overload->choice.getDeclOrNull()) {
5544-
if (getParameterList(decl)->get(paramIdx)->getTypeOfDefaultExpr()) {
5545-
conversionsOrFixes.push_back(
5546-
IgnoreDefaultExprTypeMismatch::create(*this, lhs, rhs, loc));
5547-
break;
5544+
if (auto paramList = getParameterList(decl)) {
5545+
if (paramList->get(paramIdx)->getTypeOfDefaultExpr()) {
5546+
conversionsOrFixes.push_back(
5547+
IgnoreDefaultExprTypeMismatch::create(*this, lhs, rhs, loc));
5548+
break;
5549+
}
55485550
}
55495551
}
55505552
}

0 commit comments

Comments
 (0)