From 7777ed5b009e80b21b3932e0319853cebf6249e0 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Fri, 28 Jul 2023 13:53:03 -0700 Subject: [PATCH] [Parser] NFC: Rename `isAllowedInProtocolRequirement` -> `isAllowedWhenParsingLimitedSyntax` --- lib/Parse/ParseDecl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index f6da8481a1634..764181353ed1d 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -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: @@ -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; }