Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2021-07-26 13:54:13 -07:00
3 changed files with 11 additions and 2 deletions

View File

@@ -3709,7 +3709,7 @@ static CallExpr *findTrailingClosureTarget(
return nullptr;
CallExpr *CE = cast<CallExpr>(contexts.back().get<Expr*>());
if (CE->hasTrailingClosure())
if (CE->getUnlabeledTrailingClosureIndex().hasValue())
// Call expression already has a trailing closure.
return nullptr;

View File

@@ -0,0 +1,9 @@
func lottaClosures(x: () -> Void, y: () -> Void, z: () -> Void) {
lottaClosures(x: {}) {} z: {}
}
// RUN: not %refactor -trailingclosure -source-filename %s -pos=2:3
func singleClosure(x: () -> Void) {
singleClosure {}
}
// RUN: not %refactor -trailingclosure -source-filename %s -pos=7:3

View File

@@ -120,7 +120,7 @@ git -C "%source_root%\swift" checkout-index --force --all
@set "skip_repositories_arg=%skip_repositories_arg% --skip-repository tensorflow-swift-apis"
@set "skip_repositories_arg=%skip_repositories_arg% --skip-repository yams"
call "%source_root%\swift\utils\update-checkout.cmd" %scheme_arg% %skip_repositories_arg% --clone --skip-history --github-comment "%ghprbCommentBody%" >NUL 2>NUL
call "%source_root%\swift\utils\update-checkout.cmd" %scheme_arg% %skip_repositories_arg% --clone --skip-history --skip-tags --github-comment "%ghprbCommentBody%" >NUL 2>NUL
goto :eof
endlocal