Skip to content

Commit d658894

Browse files
committed
Merge commit '29b59342f89f76a57cbbafea539d3eee3f5c0504' into master-next
This aligns master-next with the master branch at the point of the final swift-3.1-branch.
2 parents 2612603 + 29b5934 commit d658894

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+356
-211
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ function(_add_swift_library_single target name)
886886
elseif("${SWIFTLIB_SINGLE_SDK}" STREQUAL "CYGWIN")
887887
set_target_properties("${target}"
888888
PROPERTIES
889-
INSTALL_RPATH "$ORIGIN:/usr/lib/swift/windows")
889+
INSTALL_RPATH "$ORIGIN:/usr/lib/swift/cygwin")
890890
endif()
891891

892892
set_target_properties("${target}" PROPERTIES BUILD_WITH_INSTALL_RPATH YES)
@@ -1256,6 +1256,9 @@ endfunction()
12561256
# SWIFT_MODULE_DEPENDS_LINUX
12571257
# Swift modules this library depends on when built for Linux.
12581258
#
1259+
# SWIFT_MODULE_DEPENDS_CYGWIN
1260+
# Swift modules this library depends on when built for Cygwin.
1261+
#
12591262
# FRAMEWORK_DEPENDS
12601263
# System frameworks this library depends on.
12611264
#
@@ -1329,7 +1332,7 @@ function(add_swift_library name)
13291332
cmake_parse_arguments(SWIFTLIB
13301333
"${SWIFTLIB_options}"
13311334
"INSTALL_IN_COMPONENT;DEPLOYMENT_VERSION_OSX;DEPLOYMENT_VERSION_IOS;DEPLOYMENT_VERSION_TVOS;DEPLOYMENT_VERSION_WATCHOS"
1332-
"DEPENDS;LINK_LIBRARIES;SWIFT_MODULE_DEPENDS;SWIFT_MODULE_DEPENDS_OSX;SWIFT_MODULE_DEPENDS_IOS;SWIFT_MODULE_DEPENDS_TVOS;SWIFT_MODULE_DEPENDS_WATCHOS;SWIFT_MODULE_DEPENDS_FREEBSD;SWIFT_MODULE_DEPENDS_LINUX;FRAMEWORK_DEPENDS;FRAMEWORK_DEPENDS_WEAK;FRAMEWORK_DEPENDS_OSX;FRAMEWORK_DEPENDS_IOS_TVOS;LLVM_COMPONENT_DEPENDS;FILE_DEPENDS;TARGET_SDKS;C_COMPILE_FLAGS;SWIFT_COMPILE_FLAGS;SWIFT_COMPILE_FLAGS_OSX;SWIFT_COMPILE_FLAGS_IOS;SWIFT_COMPILE_FLAGS_TVOS;SWIFT_COMPILE_FLAGS_WATCHOS;LINK_FLAGS;PRIVATE_LINK_LIBRARIES;INTERFACE_LINK_LIBRARIES;INCORPORATE_OBJECT_LIBRARIES;INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY"
1335+
"DEPENDS;LINK_LIBRARIES;SWIFT_MODULE_DEPENDS;SWIFT_MODULE_DEPENDS_OSX;SWIFT_MODULE_DEPENDS_IOS;SWIFT_MODULE_DEPENDS_TVOS;SWIFT_MODULE_DEPENDS_WATCHOS;SWIFT_MODULE_DEPENDS_FREEBSD;SWIFT_MODULE_DEPENDS_LINUX;SWIFT_MODULE_DEPENDS_CYGWIN;FRAMEWORK_DEPENDS;FRAMEWORK_DEPENDS_WEAK;FRAMEWORK_DEPENDS_OSX;FRAMEWORK_DEPENDS_IOS_TVOS;LLVM_COMPONENT_DEPENDS;FILE_DEPENDS;TARGET_SDKS;C_COMPILE_FLAGS;SWIFT_COMPILE_FLAGS;SWIFT_COMPILE_FLAGS_OSX;SWIFT_COMPILE_FLAGS_IOS;SWIFT_COMPILE_FLAGS_TVOS;SWIFT_COMPILE_FLAGS_WATCHOS;LINK_FLAGS;PRIVATE_LINK_LIBRARIES;INTERFACE_LINK_LIBRARIES;INCORPORATE_OBJECT_LIBRARIES;INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY"
13331336
${ARGN})
13341337
set(SWIFTLIB_SOURCES ${SWIFTLIB_UNPARSED_ARGUMENTS})
13351338

@@ -1462,6 +1465,9 @@ function(add_swift_library name)
14621465
elseif("${sdk}" STREQUAL "LINUX" OR "${sdk}" STREQUAL "ANDROID")
14631466
list(APPEND swiftlib_module_depends_flattened
14641467
${SWIFTLIB_SWIFT_MODULE_DEPENDS_LINUX})
1468+
elseif("${sdk}" STREQUAL "CYGWIN")
1469+
list(APPEND swiftlib_module_depends_flattened
1470+
${SWIFTLIB_SWIFT_MODULE_DEPENDS_CYGWIN})
14651471
endif()
14661472

14671473
# Swift compiles depend on swift modules, while links depend on

docs/proposals/Concurrency.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ declaration of the streams in the closure.
370370
371371
Stream utilities
372372
----------------
373-
The Swift library can to implement a few utilities that will allow users and
373+
The Swift library can implement a few utilities that will allow users and
374374
library designers to build cool things:
375375

376376
* The ``Funnel`` class accepts multiple incoming streams and weaves them into a

include/swift/AST/Decl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,6 @@ class alignas(1 << DeclAlignInBits) Decl {
744744
/// Returns the source range of the entire declaration.
745745
SourceRange getSourceRange() const;
746746

747-
SourceLoc TrailingSemiLoc;
748-
749747
LLVM_ATTRIBUTE_DEPRECATED(
750748
void dump() const LLVM_ATTRIBUTE_USED,
751749
"only for use within the debugger");

include/swift/AST/DiagnosticsSema.def

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,6 +1707,12 @@ ERROR(override_ownership_mismatch,none,
17071707
"cannot override %select{strong|weak|unowned|unowned(unsafe)}0 property "
17081708
"with %select{strong|weak|unowned|unowned(unsafe)}1 property",
17091709
(/*Ownership*/unsigned, /*Ownership*/unsigned))
1710+
ERROR(override_class_declaration_in_extension,none,
1711+
"cannot override a non-dynamic class declaration from an extension",
1712+
())
1713+
WARNING(override_class_declaration_in_extension_warning,none,
1714+
"cannot override a non-dynamic class declaration from an extension",
1715+
())
17101716
ERROR(override_throws,none,
17111717
"cannot override non-throwing %select{method|initializer}0 with "
17121718
"throwing %select{method|initializer}0", (bool))

include/swift/AST/Expr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,6 @@ class alignas(8) Expr {
499499
SourceLoc getLoc() const { return (SUBEXPR)->getLoc(); } \
500500
SourceRange getSourceRange() const { return (SUBEXPR)->getSourceRange(); }
501501

502-
SourceLoc TrailingSemiLoc;
503-
504502
/// getSemanticsProvidingExpr - Find the smallest subexpression
505503
/// which obeys the property that evaluating it is exactly
506504
/// equivalent to evaluating this expression.

include/swift/AST/Stmt.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class alignas(8) Stmt {
7878
SourceLoc getEndLoc() const;
7979

8080
SourceRange getSourceRange() const;
81-
SourceLoc TrailingSemiLoc;
8281

8382
/// isImplicit - Determines whether this statement was implicitly-generated,
8483
/// rather than explicitly written in the AST.

include/swift/Parse/Parser.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,8 @@ class Parser {
603603
bool parseMatchingToken(tok K, SourceLoc &TokLoc, Diag<> ErrorDiag,
604604
SourceLoc OtherLoc);
605605

606-
/// \brief Parse the list of statements, expressions, or declarations.
606+
/// \brief Parse a comma separated list of some elements.
607607
ParserStatus parseList(tok RightK, SourceLoc LeftLoc, SourceLoc &RightLoc,
608-
tok SeparatorK, bool OptionalSep,
609608
bool AllowSepAfterLast, Diag<> ErrorDiag,
610609
std::function<ParserStatus()> callback);
611610

@@ -723,15 +722,15 @@ class Parser {
723722
DeclAttributes &Attributes);
724723
ParserStatus parseInheritance(SmallVectorImpl<TypeLoc> &Inherited,
725724
SourceLoc *classRequirementLoc);
725+
bool parseDeclList(SourceLoc LBLoc, SourceLoc &RBLoc,
726+
Diag<> ErrorDiag, ParseDeclOptions Options,
727+
llvm::function_ref<void(Decl*)> handler);
726728
ParserResult<ExtensionDecl> parseDeclExtension(ParseDeclOptions Flags,
727729
DeclAttributes &Attributes);
728730
ParserResult<EnumDecl> parseDeclEnum(ParseDeclOptions Flags,
729731
DeclAttributes &Attributes);
730732
ParserStatus parseDeclEnumCase(ParseDeclOptions Flags, DeclAttributes &Attributes,
731733
SmallVectorImpl<Decl *> &decls);
732-
bool parseNominalDeclMembers(SourceLoc LBLoc, SourceLoc &RBLoc,
733-
Diag<> ErrorDiag, ParseDeclOptions flags,
734-
llvm::function_ref<void(Decl*)> handler);
735734
ParserResult<StructDecl>
736735
parseDeclStruct(ParseDeclOptions Flags, DeclAttributes &Attributes);
737736
ParserResult<ClassDecl>

lib/Parse/ParseDecl.cpp

Lines changed: 79 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,12 +2253,6 @@ ParserStatus Parser::parseDecl(ParseDeclOptions Flags,
22532253
InternalHandler(DeclResult.get());
22542254
}
22552255

2256-
if (Tok.is(tok::semi)) {
2257-
SourceLoc TrailingSemiLoc = consumeToken(tok::semi);
2258-
if (Status.isSuccess())
2259-
LastDecl->TrailingSemiLoc = TrailingSemiLoc;
2260-
}
2261-
22622256
if (Status.isSuccess()) {
22632257
// If we parsed 'class' or 'static', but didn't handle it above, complain
22642258
// about it.
@@ -2592,6 +2586,61 @@ parseIdentifierDeclName(Parser &P, Identifier &Result, SourceLoc &L,
25922586
ResyncP1, Diagnostic(ID, Args...));
25932587
}
25942588

2589+
/// Parse a Decl item in decl list.
2590+
static ParserStatus parseDeclItem(Parser &P,
2591+
bool &PreviousHadSemi,
2592+
Parser::ParseDeclOptions Options,
2593+
llvm::function_ref<void(Decl*)> handler) {
2594+
if (P.Tok.is(tok::semi)) {
2595+
// Consume ';' without preceding decl.
2596+
P.diagnose(P.Tok, diag::unexpected_separator, ";")
2597+
.fixItRemove(P.Tok.getLoc());
2598+
P.consumeToken();
2599+
// Return success because we already recovered.
2600+
return makeParserSuccess();
2601+
}
2602+
2603+
// If the previous declaration didn't have a semicolon and this new
2604+
// declaration doesn't start a line, complain.
2605+
if (!PreviousHadSemi && !P.Tok.isAtStartOfLine() && !P.Tok.is(tok::unknown)) {
2606+
auto endOfPrevious = P.getEndOfPreviousLoc();
2607+
P.diagnose(endOfPrevious, diag::declaration_same_line_without_semi)
2608+
.fixItInsert(endOfPrevious, ";");
2609+
}
2610+
2611+
ParserStatus Status = P.parseDecl(Options, handler);
2612+
if (Status.isError())
2613+
P.skipUntilDeclRBrace(tok::semi, tok::pound_endif);
2614+
PreviousHadSemi = P.consumeIf(tok::semi);
2615+
return Status;
2616+
}
2617+
2618+
/// \brief Parse the members in a struct/class/enum/protocol/extension.
2619+
///
2620+
/// \verbatim
2621+
/// decl* '}'
2622+
/// \endverbatim
2623+
bool Parser::parseDeclList(SourceLoc LBLoc, SourceLoc &RBLoc,
2624+
Diag<> ErrorDiag, ParseDeclOptions Options,
2625+
llvm::function_ref<void(Decl*)> handler) {
2626+
ParserStatus Status;
2627+
bool PreviousHadSemi = true;
2628+
while (Tok.isNot(tok::r_brace)) {
2629+
Status |= parseDeclItem(*this, PreviousHadSemi, Options, handler);
2630+
if (Tok.isAny(tok::eof, tok::pound_endif, tok::pound_else,
2631+
tok::pound_elseif)) {
2632+
IsInputIncomplete = true;
2633+
break;
2634+
}
2635+
}
2636+
2637+
parseMatchingToken(tok::r_brace, RBLoc, ErrorDiag, LBLoc);
2638+
2639+
// If we found the closing brace, then the caller should not care if there
2640+
// were errors while parsing inner decls, because we recovered.
2641+
return !RBLoc.isValid();
2642+
}
2643+
25952644
/// \brief Parse an 'extension' declaration.
25962645
///
25972646
/// \verbatim
@@ -2651,20 +2700,15 @@ Parser::parseDeclExtension(ParseDeclOptions Flags, DeclAttributes &Attributes) {
26512700
ContextChange CC(*this, ext);
26522701
Scope S(this, ScopeKind::Extension);
26532702

2654-
ParserStatus BodyStatus =
2655-
parseList(tok::r_brace, LBLoc, RBLoc, tok::semi, /*OptionalSep=*/true,
2656-
/*AllowSepAfterLast=*/false, diag::expected_rbrace_extension,
2657-
[&]() -> ParserStatus {
2658-
ParseDeclOptions Options(PD_HasContainerType |
2659-
PD_InExtension);
2703+
ParseDeclOptions Options(PD_HasContainerType | PD_InExtension);
2704+
2705+
if (parseDeclList(LBLoc, RBLoc, diag::expected_rbrace_extension,
2706+
Options, [&] (Decl *D) {ext->addMember(D);}))
2707+
status.setIsParseError();
26602708

2661-
return parseDecl(Options, [&] (Decl *D) {ext->addMember(D);});
2662-
});
26632709
// Don't propagate the code completion bit from members: we cannot help
26642710
// code completion inside a member decl, and our callers cannot do
26652711
// anything about it either. But propagate the error bit.
2666-
if (BodyStatus.isError())
2667-
status.setIsParseError();
26682712
}
26692713

26702714
ext->setBraces({LBLoc, RBLoc});
@@ -2862,14 +2906,20 @@ ParserResult<IfConfigDecl> Parser::parseDeclIfConfig(ParseDeclOptions Flags) {
28622906
SmallVector<Decl*, 8> Decls;
28632907
if (ConfigState.shouldParse()) {
28642908
ParserStatus Status;
2865-
while (Tok.isNot(tok::pound_else) && Tok.isNot(tok::pound_endif) &&
2866-
Tok.isNot(tok::pound_elseif)) {
2867-
Status = parseDecl(Flags, [&](Decl *D) {Decls.push_back(D);});
2868-
if (Status.isError()) {
2869-
diagnose(Tok, diag::expected_close_to_if_directive);
2909+
bool PreviousHadSemi = true;
2910+
while (Tok.isNot(tok::pound_else, tok::pound_endif, tok::pound_elseif)) {
2911+
SourceLoc StartLoc = Tok.getLoc();
2912+
Status |= parseDeclItem(*this, PreviousHadSemi, Flags,
2913+
[&](Decl *D) {Decls.push_back(D);});
2914+
if (StartLoc == Tok.getLoc()) {
2915+
assert(Status.isError() && "no progress without error?");
28702916
skipUntilConditionalBlockClose();
28712917
break;
28722918
}
2919+
if (Tok.isAny(tok::eof)) {
2920+
diagnose(Tok, diag::expected_close_to_if_directive);
2921+
break;
2922+
}
28732923
}
28742924
} else {
28752925
DiagnosticTransaction DT(Diags);
@@ -4773,9 +4823,8 @@ ParserResult<EnumDecl> Parser::parseDeclEnum(ParseDeclOptions Flags,
47734823
ContextChange CC(*this, ED);
47744824
Scope S(this, ScopeKind::ClassBody);
47754825
ParseDeclOptions Options(PD_HasContainerType | PD_AllowEnumElement | PD_InEnum);
4776-
if (parseNominalDeclMembers(LBLoc, RBLoc,
4777-
diag::expected_rbrace_enum,
4778-
Options, [&] (Decl *D) { ED->addMember(D); }))
4826+
if (parseDeclList(LBLoc, RBLoc, diag::expected_rbrace_enum,
4827+
Options, [&] (Decl *D) { ED->addMember(D); }))
47794828
Status.setIsParseError();
47804829
}
47814830

@@ -4956,47 +5005,6 @@ ParserStatus Parser::parseDeclEnumCase(ParseDeclOptions Flags,
49565005
return Status;
49575006
}
49585007

4959-
/// \brief Parse the members in a struct/class/enum/protocol definition.
4960-
///
4961-
/// \verbatim
4962-
/// decl*
4963-
/// \endverbatim
4964-
bool Parser::parseNominalDeclMembers(SourceLoc LBLoc, SourceLoc &RBLoc,
4965-
Diag<> ErrorDiag, ParseDeclOptions flags,
4966-
llvm::function_ref<void(Decl*)> handler) {
4967-
Decl *lastDecl = nullptr;
4968-
auto internalHandler = [&](Decl *D) {
4969-
lastDecl = D;
4970-
handler(D);
4971-
};
4972-
bool previousHadSemi = true;
4973-
parseList(tok::r_brace, LBLoc, RBLoc, tok::semi, /*OptionalSep=*/true,
4974-
/*AllowSepAfterLast=*/false, ErrorDiag, [&]() -> ParserStatus {
4975-
// If the previous declaration didn't have a semicolon and this new
4976-
// declaration doesn't start a line, complain.
4977-
if (!previousHadSemi && !Tok.isAtStartOfLine() && !Tok.is(tok::unknown)) {
4978-
SourceLoc endOfPrevious = getEndOfPreviousLoc();
4979-
diagnose(endOfPrevious, diag::declaration_same_line_without_semi)
4980-
.fixItInsert(endOfPrevious, ";");
4981-
// FIXME: Add semicolon to the AST?
4982-
}
4983-
4984-
previousHadSemi = false;
4985-
if (parseDecl(flags, internalHandler).isError())
4986-
return makeParserError();
4987-
4988-
// Check whether the previous declaration had a semicolon after it.
4989-
if (lastDecl && lastDecl->TrailingSemiLoc.isValid())
4990-
previousHadSemi = true;
4991-
4992-
return makeParserSuccess();
4993-
});
4994-
4995-
// If we found the closing brace, then the caller should not care if there
4996-
// were errors while parsing inner decls, because we recovered.
4997-
return !RBLoc.isValid();
4998-
}
4999-
50005008
/// \brief Parse a 'struct' declaration, returning true (and doing no token
50015009
/// skipping) on error.
50025010
///
@@ -5070,9 +5078,8 @@ ParserResult<StructDecl> Parser::parseDeclStruct(ParseDeclOptions Flags,
50705078
ContextChange CC(*this, SD);
50715079
Scope S(this, ScopeKind::StructBody);
50725080
ParseDeclOptions Options(PD_HasContainerType | PD_InStruct);
5073-
if (parseNominalDeclMembers(LBLoc, RBLoc,
5074-
diag::expected_rbrace_struct,
5075-
Options, [&](Decl *D) {SD->addMember(D);}))
5081+
if (parseDeclList(LBLoc, RBLoc, diag::expected_rbrace_struct,
5082+
Options, [&](Decl *D) {SD->addMember(D);}))
50765083
Status.setIsParseError();
50775084
}
50785085

@@ -5160,8 +5167,8 @@ ParserResult<ClassDecl> Parser::parseDeclClass(SourceLoc ClassLoc,
51605167
if (isa<DestructorDecl>(D))
51615168
CD->setHasDestructor();
51625169
};
5163-
if (parseNominalDeclMembers(LBLoc, RBLoc, diag::expected_rbrace_class,
5164-
Options, Handler))
5170+
if (parseDeclList(LBLoc, RBLoc, diag::expected_rbrace_class,
5171+
Options, Handler))
51655172
Status.setIsParseError();
51665173
}
51675174

@@ -5259,9 +5266,8 @@ parseDeclProtocol(ParseDeclOptions Flags, DeclAttributes &Attributes) {
52595266
ParseDeclOptions Options(PD_HasContainerType |
52605267
PD_DisallowInit |
52615268
PD_InProtocol);
5262-
if (parseNominalDeclMembers(LBraceLoc, RBraceLoc,
5263-
diag::expected_rbrace_protocol,
5264-
Options, [&](Decl *D) {Proto->addMember(D);}))
5269+
if (parseDeclList(LBraceLoc, RBraceLoc, diag::expected_rbrace_protocol,
5270+
Options, [&](Decl *D) {Proto->addMember(D);}))
52655271
Status.setIsParseError();
52665272
}
52675273

lib/Parse/ParseExpr.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,8 +2528,7 @@ ParserStatus Parser::parseExprList(tok leftTok, tok rightTok,
25282528
StructureMarkerRAII ParsingExprList(*this, Tok);
25292529

25302530
leftLoc = consumeToken(leftTok);
2531-
ParserStatus status = parseList(rightTok, leftLoc, rightLoc, tok::comma,
2532-
/*OptionalSep=*/false,
2531+
ParserStatus status = parseList(rightTok, leftLoc, rightLoc,
25332532
/*AllowSepAfterLast=*/false,
25342533
rightTok == tok::r_paren
25352534
? diag::expected_rparen_expr_list
@@ -2877,7 +2876,6 @@ ParserResult<Expr> Parser::parseExprArray(SourceLoc LSquareLoc,
28772876
CommaLocs.push_back(CommaLoc);
28782877

28792878
Status |= parseList(tok::r_square, LSquareLoc, RSquareLoc,
2880-
tok::comma, /*OptionalSep=*/false,
28812879
/*AllowSepAfterLast=*/true,
28822880
diag::expected_rsquare_array_expr,
28832881
[&] () -> ParserStatus
@@ -2928,8 +2926,8 @@ ParserResult<Expr> Parser::parseExprDictionary(SourceLoc LSquareLoc,
29282926
bool FirstPair = true;
29292927

29302928
ParserStatus Status =
2931-
parseList(tok::r_square, LSquareLoc, RSquareLoc, tok::comma,
2932-
/*OptionalSep=*/false, /*AllowSepAfterLast=*/true,
2929+
parseList(tok::r_square, LSquareLoc, RSquareLoc,
2930+
/*AllowSepAfterLast=*/true,
29332931
diag::expected_rsquare_array_expr, [&]() -> ParserStatus {
29342932
// Parse the next key.
29352933
ParserResult<Expr> Key;

lib/Parse/ParsePattern.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
159159

160160
// Parse the parameter list.
161161
bool isClosure = paramContext == ParameterContextKind::Closure;
162-
return parseList(tok::r_paren, leftParenLoc, rightParenLoc, tok::comma,
163-
/*OptionalSep=*/false, /*AllowSepAfterLast=*/false,
162+
return parseList(tok::r_paren, leftParenLoc, rightParenLoc,
163+
/*AllowSepAfterLast=*/false,
164164
diag::expected_rparen_parameter,
165165
[&]() -> ParserStatus {
166166
ParsedParameter param;
@@ -867,7 +867,7 @@ ParserResult<Pattern> Parser::parsePatternTuple() {
867867
// Parse all the elements.
868868
SmallVector<TuplePatternElt, 8> elts;
869869
ParserStatus ListStatus =
870-
parseList(tok::r_paren, LPLoc, RPLoc, tok::comma, /*OptionalSep=*/false,
870+
parseList(tok::r_paren, LPLoc, RPLoc,
871871
/*AllowSepAfterLast=*/false,
872872
diag::expected_rparen_tuple_pattern_list,
873873
[&] () -> ParserStatus {

lib/Parse/ParseSIL.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,6 @@ bool SILParser::parseSILBBArgsAtBranch(SmallVector<SILValue, 6> &Args,
12331233
SourceLoc RParenLoc;
12341234

12351235
if (P.parseList(tok::r_paren, LParenLoc, RParenLoc,
1236-
tok::comma, /*OptionalSep=*/false,
12371236
/*AllowSepAfterLast=*/false,
12381237
diag::sil_basicblock_arg_rparen,
12391238
[&]() -> ParserStatus {

0 commit comments

Comments
 (0)