[CSClosure] SE-0326: Type-checker statement conditions individually

Instead of referencing whole statement condition, break it down to
individual elements and solve them separately.

Resolves: rdar://88720312
This commit is contained in:
Pavel Yaskevich
2022-02-11 12:55:37 -08:00
committed by Pavel Yaskevich
parent 3efcebf830
commit 0cc8bc7928
7 changed files with 44 additions and 45 deletions

View File

@@ -6050,8 +6050,8 @@ SourceLoc constraints::getLoc(ASTNode anchor) {
return S->getStartLoc();
} else if (auto *P = anchor.dyn_cast<Pattern *>()) {
return P->getLoc();
} else if (auto *C = anchor.dyn_cast<StmtCondition *>()) {
return C->front().getStartLoc();
} else if (auto *C = anchor.dyn_cast<StmtConditionElement *>()) {
return C->getStartLoc();
} else {
auto *I = anchor.get<CaseLabelItem *>();
return I->getStartLoc();