Skip to content

Commit 84ff97a

Browse files
committed
[NFC] Drop a dead overload of DynamicSubscriptExpr::create
1 parent 8a3e4a2 commit 84ff97a

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

include/swift/AST/Expr.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,17 +1741,6 @@ class DynamicSubscriptExpr final
17411741
llvm::function_ref<Type(const Expr *)> getType =
17421742
[](const Expr *E) -> Type { return E->getType(); });
17431743

1744-
/// Create a new dynamic subscript.
1745-
static DynamicSubscriptExpr *create(ASTContext &ctx, Expr *base,
1746-
SourceLoc lSquareLoc,
1747-
ArrayRef<Expr *> indexArgs,
1748-
ArrayRef<Identifier> indexArgLabels,
1749-
ArrayRef<SourceLoc> indexArgLabelLocs,
1750-
SourceLoc rSquareLoc,
1751-
Expr *trailingClosure,
1752-
ConcreteDeclRef decl,
1753-
bool implicit);
1754-
17551744
/// getIndex - Retrieve the index of the subscript expression, i.e., the
17561745
/// "offset" into the base value.
17571746
Expr *getIndex() const { return Index; }

lib/AST/Expr.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,33 +1504,6 @@ DynamicSubscriptExpr::create(ASTContext &ctx, Expr *base, Expr *index,
15041504
hasTrailingClosure, decl, implicit);
15051505
}
15061506

1507-
DynamicSubscriptExpr *
1508-
DynamicSubscriptExpr::create(ASTContext &ctx, Expr *base, SourceLoc lSquareLoc,
1509-
ArrayRef<Expr *> indexArgs,
1510-
ArrayRef<Identifier> indexArgLabels,
1511-
ArrayRef<SourceLoc> indexArgLabelLocs,
1512-
SourceLoc rSquareLoc,
1513-
Expr *trailingClosure,
1514-
ConcreteDeclRef decl,
1515-
bool implicit) {
1516-
SmallVector<Identifier, 4> indexArgLabelsScratch;
1517-
SmallVector<SourceLoc, 4> indexArgLabelLocsScratch;
1518-
Expr *index = packSingleArgument(ctx, lSquareLoc, indexArgs, indexArgLabels,
1519-
indexArgLabelLocs, rSquareLoc,
1520-
trailingClosure, implicit,
1521-
indexArgLabelsScratch,
1522-
indexArgLabelLocsScratch);
1523-
1524-
size_t size = totalSizeToAlloc(indexArgLabels, indexArgLabelLocs,
1525-
trailingClosure != nullptr);
1526-
1527-
void *memory = ctx.Allocate(size, alignof(DynamicSubscriptExpr));
1528-
return new (memory) DynamicSubscriptExpr(base, index, indexArgLabels,
1529-
indexArgLabelLocs,
1530-
trailingClosure != nullptr,
1531-
decl, implicit);
1532-
}
1533-
15341507
UnresolvedMemberExpr::UnresolvedMemberExpr(SourceLoc dotLoc,
15351508
DeclNameLoc nameLoc,
15361509
DeclNameRef name, Expr *argument,

0 commit comments

Comments
 (0)