[Sema] Improve diagnostic message for out of order arguments

* Argument numbers are 1 based, not starting from 0.
* Use the term `argument` consistently, `parameter` is not a term for call site.
This commit is contained in:
Rintaro Ishizaki
2016-07-21 16:19:05 +09:00
parent d9d5829251
commit 17ec1acdb7
5 changed files with 13 additions and 13 deletions

View File

@@ -4255,15 +4255,15 @@ static bool diagnoseSingleCandidateFailures(CalleeCandidateInfo &CCI,
if (first.empty() && second.empty()) {
TC.diagnose(diagLoc, diag::argument_out_of_order_unnamed_unnamed,
OOOArgIdx, OOOPrevArgIdx)
OOOArgIdx + 1, OOOPrevArgIdx + 1)
.fixItExchange(firstRange, secondRange);
} else if (first.empty() && !second.empty()) {
TC.diagnose(diagLoc, diag::argument_out_of_order_unnamed_named,
OOOArgIdx, second)
OOOArgIdx + 1, second)
.fixItExchange(firstRange, secondRange);
} else if (!first.empty() && second.empty()) {
TC.diagnose(diagLoc, diag::argument_out_of_order_named_unnamed,
first, OOOPrevArgIdx)
first, OOOPrevArgIdx + 1)
.fixItExchange(firstRange, secondRange);
} else {
TC.diagnose(diagLoc, diag::argument_out_of_order_named_named,