@@ -5052,10 +5052,10 @@ parseDeclTypeAlias(Parser::ParseDeclOptions Flags, DeclAttributes &Attributes) {
5052
5052
TAD->setUnderlyingTypeRepr(UnderlyingTy.getPtrOrNull());
5053
5053
TAD->getAttrs() = Attributes;
5054
5054
5055
- // Parse a 'where' clause if present, adding it to our GenericParamList .
5055
+ // Parse a 'where' clause if present.
5056
5056
if (Tok.is(tok::kw_where)) {
5057
5057
ContextChange CC(*this, TAD);
5058
- Status |= parseFreestandingGenericWhereClause(TAD, genericParams, Flags );
5058
+ Status |= parseFreestandingGenericWhereClause(TAD);
5059
5059
}
5060
5060
5061
5061
if (UnderlyingTy.isNull()) {
@@ -6393,11 +6393,11 @@ ParserResult<FuncDecl> Parser::parseDeclFunc(SourceLoc StaticLoc,
6393
6393
}
6394
6394
}
6395
6395
6396
- // Parse a 'where' clause if present, adding it to our GenericParamList .
6396
+ // Parse a 'where' clause if present.
6397
6397
if (Tok.is(tok::kw_where)) {
6398
6398
ContextChange CC(*this, FD);
6399
6399
6400
- Status |= parseFreestandingGenericWhereClause(FD, GenericParams, Flags );
6400
+ Status |= parseFreestandingGenericWhereClause(FD);
6401
6401
if (Status.hasCodeCompletion() && !CodeCompletion) {
6402
6402
// Trigger delayed parsing, no need to continue.
6403
6403
return Status;
@@ -6650,10 +6650,9 @@ ParserResult<EnumDecl> Parser::parseDeclEnum(ParseDeclOptions Flags,
6650
6650
6651
6651
diagnoseWhereClauseInGenericParamList(GenericParams);
6652
6652
6653
- // Parse a 'where' clause if present, adding it to our GenericParamList .
6653
+ // Parse a 'where' clause if present.
6654
6654
if (Tok.is(tok::kw_where)) {
6655
- auto whereStatus =
6656
- parseFreestandingGenericWhereClause(ED, GenericParams, Flags);
6655
+ auto whereStatus = parseFreestandingGenericWhereClause(ED);
6657
6656
if (whereStatus.hasCodeCompletion() && !CodeCompletion) {
6658
6657
// Trigger delayed parsing, no need to continue.
6659
6658
return whereStatus;
@@ -6931,10 +6930,9 @@ ParserResult<StructDecl> Parser::parseDeclStruct(ParseDeclOptions Flags,
6931
6930
6932
6931
diagnoseWhereClauseInGenericParamList(GenericParams);
6933
6932
6934
- // Parse a 'where' clause if present, adding it to our GenericParamList .
6933
+ // Parse a 'where' clause if present.
6935
6934
if (Tok.is(tok::kw_where)) {
6936
- auto whereStatus =
6937
- parseFreestandingGenericWhereClause(SD, GenericParams, Flags);
6935
+ auto whereStatus = parseFreestandingGenericWhereClause(SD);
6938
6936
if (whereStatus.hasCodeCompletion() && !CodeCompletion) {
6939
6937
// Trigger delayed parsing, no need to continue.
6940
6938
return whereStatus;
@@ -7044,10 +7042,9 @@ ParserResult<ClassDecl> Parser::parseDeclClass(ParseDeclOptions Flags,
7044
7042
7045
7043
diagnoseWhereClauseInGenericParamList(GenericParams);
7046
7044
7047
- // Parse a 'where' clause if present, adding it to our GenericParamList .
7045
+ // Parse a 'where' clause if present.
7048
7046
if (Tok.is(tok::kw_where)) {
7049
- auto whereStatus =
7050
- parseFreestandingGenericWhereClause(CD, GenericParams, Flags);
7047
+ auto whereStatus = parseFreestandingGenericWhereClause(CD);
7051
7048
if (whereStatus.hasCodeCompletion() && !CodeCompletion) {
7052
7049
// Trigger delayed parsing, no need to continue.
7053
7050
return whereStatus;
@@ -7287,12 +7284,11 @@ Parser::parseDeclSubscript(SourceLoc StaticLoc,
7287
7284
7288
7285
DefaultArgs.setFunctionContext(Subscript, Subscript->getIndices());
7289
7286
7290
- // Parse a 'where' clause if present, adding it to our GenericParamList .
7287
+ // Parse a 'where' clause if present.
7291
7288
if (Tok.is(tok::kw_where)) {
7292
7289
ContextChange CC(*this, Subscript);
7293
7290
7294
- Status |= parseFreestandingGenericWhereClause(Subscript, GenericParams,
7295
- Flags);
7291
+ Status |= parseFreestandingGenericWhereClause(Subscript);
7296
7292
if (Status.hasCodeCompletion() && !CodeCompletion) {
7297
7293
// Trigger delayed parsing, no need to continue.
7298
7294
return Status;
@@ -7430,11 +7426,11 @@ Parser::parseDeclInit(ParseDeclOptions Flags, DeclAttributes &Attributes) {
7430
7426
CD->setImplicitlyUnwrappedOptional(IUO);
7431
7427
CD->getAttrs() = Attributes;
7432
7428
7433
- // Parse a 'where' clause if present, adding it to our GenericParamList .
7429
+ // Parse a 'where' clause if present.
7434
7430
if (Tok.is(tok::kw_where)) {
7435
7431
ContextChange(*this, CD);
7436
7432
7437
- Status |= parseFreestandingGenericWhereClause(CD, GenericParams, Flags );
7433
+ Status |= parseFreestandingGenericWhereClause(CD);
7438
7434
if (Status.hasCodeCompletion() && !CodeCompletion) {
7439
7435
// Trigger delayed parsing, no need to continue.
7440
7436
return Status;
0 commit comments