@@ -1129,10 +1129,6 @@ static void parseGuardedPattern(Parser &P, GuardedPattern &result,
1129
1129
boundDecls.push_back (VD);
1130
1130
});
1131
1131
1132
- // Now that we have them, mark them as being initialized without a PBD.
1133
- for (auto VD : boundDecls)
1134
- VD->setHasNonPatternBindingInit ();
1135
-
1136
1132
// Parse the optional 'where' guard.
1137
1133
parseWhereGuard (P, result, status, parsingContext, isExprBasic);
1138
1134
} else {
@@ -1178,10 +1174,6 @@ static void parseGuardedPattern(Parser &P, GuardedPattern &result,
1178
1174
status.setIsParseError ();
1179
1175
}
1180
1176
}
1181
-
1182
- for (auto VD : repeatedDecls) {
1183
- VD->setHasNonPatternBindingInit ();
1184
- }
1185
1177
1186
1178
// Parse the optional 'where' guard, with this particular pattern's bound
1187
1179
// vars in scope.
@@ -1544,7 +1536,6 @@ Parser::parseStmtConditionElement(SmallVectorImpl<StmtConditionElement> &result,
1544
1536
setLocalDiscriminator (VD);
1545
1537
if (VD->hasName ())
1546
1538
addToScope (VD);
1547
- VD->setHasNonPatternBindingInit ();
1548
1539
});
1549
1540
return Status;
1550
1541
}
@@ -2034,7 +2025,6 @@ ParserResult<CaseStmt> Parser::parseStmtCatch() {
2034
2025
auto *vNew = new (Context) VarDecl (
2035
2026
/* IsStatic*/ false , vOld->getIntroducer (),
2036
2027
vOld->getNameLoc (), vOld->getName (), vOld->getDeclContext ());
2037
- vNew->setHasNonPatternBindingInit ();
2038
2028
vNew->setImplicit ();
2039
2029
Result[i] = vNew;
2040
2030
}
@@ -2145,9 +2135,6 @@ ParserResult<Stmt> Parser::parseStmtForEach(LabeledStmtInfo LabelInfo) {
2145
2135
parseToken (tok::kw_in, InLoc, diag::expected_foreach_in);
2146
2136
}
2147
2137
2148
- // Bound variables all get their initial values from the generator.
2149
- pattern.get ()->markHasNonPatternBindingInit ();
2150
-
2151
2138
if (IsCStyleFor) {
2152
2139
// Skip until start of body part.
2153
2140
if (Tok.is (tok::l_paren)) {
@@ -2381,7 +2368,6 @@ parseStmtCase(Parser &P, SourceLoc &CaseLoc,
2381
2368
auto *vNew = new (P.Context ) VarDecl (
2382
2369
/* IsStatic*/ false , vOld->getIntroducer (),
2383
2370
vOld->getNameLoc (), vOld->getName (), vOld->getDeclContext ());
2384
- vNew->setHasNonPatternBindingInit ();
2385
2371
vNew->setImplicit ();
2386
2372
Result[i] = vNew;
2387
2373
}
0 commit comments