Skip to content

Commit

Permalink
[Parser] NFC: Rename isAllowedInProtocolRequirement -> `isAllowedWh…
Browse files Browse the repository at this point in the history
…enParsingLimitedSyntax`
  • Loading branch information
xedin committed Jul 28, 2023
1 parent aabd1b7 commit 7777ed5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7281,7 +7281,7 @@ static void diagnoseRedundantAccessors(Parser &P, SourceLoc loc,
/*already*/ true);
}

static bool isAllowedInProtocolRequirement(AccessorKind kind, bool forSIL) {
static bool isAllowedWhenParsingLimitedSyntax(AccessorKind kind, bool forSIL) {
switch (kind) {
case AccessorKind::Get:
case AccessorKind::Set:
Expand Down Expand Up @@ -7690,8 +7690,8 @@ ParserStatus Parser::parseGetSet(ParseDeclOptions Flags, ParameterList *Indices,

// For now, immediately reject illegal accessors in protocols just to
// avoid having to deal with them everywhere.
if (parsingLimitedSyntax &&
!isAllowedInProtocolRequirement(Kind, SF.Kind == SourceFileKind::SIL)) {
if (parsingLimitedSyntax && !isAllowedWhenParsingLimitedSyntax(
Kind, SF.Kind == SourceFileKind::SIL)) {
diagnose(Loc, diag::expected_getset_in_protocol);
continue;
}
Expand Down

0 comments on commit 7777ed5

Please sign in to comment.