Skip to content

Commit b5f02c3

Browse files
committed
[NFC] Remove unused Parser::parseUnqualifiedDeclName methods
1 parent 9fa4303 commit b5f02c3

File tree

2 files changed

+0
-74
lines changed

2 files changed

+0
-74
lines changed

include/swift/Parse/Parser.h

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,39 +1450,6 @@ class Parser {
14501450
DeclNameRef parseDeclNameRef(DeclNameLoc &loc, const Diagnostic &diag,
14511451
DeclNameOptions flags);
14521452

1453-
/// Parse an unqualified-decl-base-name.
1454-
///
1455-
/// unqualified-decl-name:
1456-
/// identifier
1457-
///
1458-
/// \param afterDot Whether this identifier is coming after a period, which
1459-
/// enables '.init' and '.default' like expressions.
1460-
/// \param loc Will be populated with the location of the name.
1461-
/// \param diag The diagnostic to emit if this is not a name.
1462-
/// \param allowOperators Whether to allow operator basenames too.
1463-
DeclNameRef parseUnqualifiedDeclBaseName(bool afterDot, DeclNameLoc &loc,
1464-
const Diagnostic &diag,
1465-
bool allowOperators=false,
1466-
bool allowDeinitAndSubscript=false);
1467-
1468-
/// Parse an unqualified-decl-name.
1469-
///
1470-
/// unqualified-decl-name:
1471-
/// unqualified-decl-base-name
1472-
/// unqualified-decl-base-name '(' ((identifier | '_') ':') + ')'
1473-
///
1474-
/// \param afterDot Whether this identifier is coming after a period, which
1475-
/// enables '.init' and '.default' like expressions.
1476-
/// \param loc Will be populated with the location of the name.
1477-
/// \param diag The diagnostic to emit if this is not a name.
1478-
/// \param allowOperators Whether to allow operator basenames too.
1479-
/// \param allowZeroArgCompoundNames Whether to allow empty argument lists.
1480-
DeclNameRef parseUnqualifiedDeclName(bool afterDot, DeclNameLoc &loc,
1481-
const Diagnostic &diag,
1482-
bool allowOperators=false,
1483-
bool allowZeroArgCompoundNames=false,
1484-
bool allowDeinitAndSubscript=false);
1485-
14861453
Expr *parseExprIdentifier();
14871454
Expr *parseExprEditorPlaceholder(Token PlaceholderTok,
14881455
Identifier PlaceholderId);

lib/Parse/ParseExpr.cpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,47 +2219,6 @@ DeclNameRef Parser::parseDeclNameRef(DeclNameLoc &loc,
22192219
return DeclNameRef({ Context, baseName, argumentLabels });
22202220
}
22212221

2222-
DeclNameRef Parser::parseUnqualifiedDeclBaseName(
2223-
bool afterDot,
2224-
DeclNameLoc &loc,
2225-
const Diagnostic &diag,
2226-
bool allowOperators,
2227-
bool allowDeinitAndSubscript) {
2228-
DeclNameOptions flags = {};
2229-
if (afterDot)
2230-
flags |= DeclNameFlag::AllowKeywords;
2231-
if (allowOperators)
2232-
flags |= DeclNameFlag::AllowOperators;
2233-
if (allowDeinitAndSubscript) {
2234-
assert(afterDot);
2235-
flags |= DeclNameFlag::UseSpecialNamesForDeinitAndSubscript;
2236-
}
2237-
2238-
return parseDeclNameRef(loc, diag, flags);
2239-
}
2240-
2241-
2242-
DeclNameRef Parser::parseUnqualifiedDeclName(bool afterDot,
2243-
DeclNameLoc &loc,
2244-
const Diagnostic &diag,
2245-
bool allowOperators,
2246-
bool allowZeroArgCompoundNames,
2247-
bool allowDeinitAndSubscript) {
2248-
DeclNameOptions flags = DeclNameFlag::AllowCompoundNames;
2249-
if (afterDot)
2250-
flags |= DeclNameFlag::AllowKeywords;
2251-
if (allowOperators)
2252-
flags |= DeclNameFlag::AllowOperators;
2253-
if (allowDeinitAndSubscript) {
2254-
assert(afterDot);
2255-
flags |= DeclNameFlag::UseSpecialNamesForDeinitAndSubscript;
2256-
}
2257-
if (allowZeroArgCompoundNames)
2258-
flags |= DeclNameFlag::AllowZeroArgCompoundNames;
2259-
2260-
return parseDeclNameRef(loc, diag, flags);
2261-
}
2262-
22632222
/// expr-identifier:
22642223
/// unqualified-decl-name generic-args?
22652224
Expr *Parser::parseExprIdentifier() {

0 commit comments

Comments
 (0)