We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getLoc(ASTNode)
1 parent 573ae9b commit 4c415abCopy full SHA for 4c415ab
lib/Sema/ConstraintSystem.cpp
@@ -5691,8 +5691,13 @@ SourceLoc constraints::getLoc(ASTNode anchor) {
5691
return anchor.getStartLoc();
5692
} else if (auto *S = anchor.dyn_cast<Stmt *>()) {
5693
return S->getStartLoc();
5694
+ } else if (auto *P = anchor.dyn_cast<Pattern *>()) {
5695
+ return P->getLoc();
5696
+ } else if (auto *C = anchor.dyn_cast<StmtCondition *>()) {
5697
+ return C->front().getStartLoc();
5698
} else {
- return anchor.get<Pattern *>()->getLoc();
5699
+ auto *I = anchor.get<CaseLabelItem *>();
5700
+ return I->getStartLoc();
5701
}
5702
5703
0 commit comments