Skip to content

Commit a82855b

Browse files
authored
Merge pull request #29085 from xedin/add-null-check-for-repair-failures
[Diagnostics] Add nullptr check for anchor while fixing function resu…
2 parents 98a5c04 + 4c1e2c6 commit a82855b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3509,7 +3509,7 @@ bool ConstraintSystem::repairFailures(
35093509
}
35103510
}
35113511
// Handle function result coerce expression wrong type conversion.
3512-
if (isa<CoerceExpr>(anchor)) {
3512+
if (anchor && isa<CoerceExpr>(anchor)) {
35133513
auto *fix =
35143514
ContextualMismatch::create(*this, lhs, rhs, loc);
35153515
conversionsOrFixes.push_back(fix);

0 commit comments

Comments
 (0)