Skip to content

Commit 56cec98

Browse files
committed
---
yaml --- r: 349176 b: refs/heads/master-next c: b8528cd h: refs/heads/master
1 parent d08625e commit 56cec98

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 881f521958be6f19e1d3ef505765f77840b026b4
3+
refs/heads/master-next: b8528cd5750a95779411863747f4babbc8072164
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/lib/Sema/CSSimplify.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ matchCallArguments(ArrayRef<AnyFunctionType::Param> args,
575575

576576
// If we have any unfulfilled parameters, check them now.
577577
if (haveUnfulfilledParams) {
578+
bool hasSynthesizedArgs = false;
578579
for (paramIdx = 0; paramIdx != numParams; ++paramIdx) {
579580
// If we have a binding for this parameter, we're done.
580581
if (!parameterBindings[paramIdx].empty())
@@ -590,16 +591,19 @@ matchCallArguments(ArrayRef<AnyFunctionType::Param> args,
590591
if (paramInfo.hasDefaultArgument(paramIdx))
591592
continue;
592593

593-
if (potentiallyOutOfOrder)
594-
return true;
595-
596594
if (auto newArgIdx = listener.missingArgument(paramIdx)) {
597595
parameterBindings[paramIdx].push_back(*newArgIdx);
596+
hasSynthesizedArgs = true;
598597
continue;
599598
}
600599

601600
return true;
602601
}
602+
603+
// If all of the missing arguments have been synthesized,
604+
// let's stop since we have found the problem.
605+
if (hasSynthesizedArgs)
606+
return false;
603607
}
604608

605609
// If any arguments were provided out-of-order, check whether we have

0 commit comments

Comments
 (0)