Bug 1444416: Make the diagnostic point to the bogus argument. r=mystor

It's much easier to find that way, specially for functions with tons of
argument.

MozReview-Commit-ID: i3PMjDOcH7

--HG--
extra : rebase_source : 2c79f0b4eb5c6022c3896ded3bd26ceda524ce5a
This commit is contained in:
Emilio Cobos Álvarez 2018-03-09 19:37:58 +01:00
Родитель 2125f0fbd4
Коммит b4171daa96
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -229,7 +229,7 @@ void CanRunScriptChecker::check(const MatchFinder::MatchResult &Result) {
// If we have an invalid argument in the call, we emit the diagnostic to // If we have an invalid argument in the call, we emit the diagnostic to
// signal it. // signal it.
if (InvalidArg) { if (InvalidArg) {
diag(CallRange.getBegin(), ErrorInvalidArg, DiagnosticIDs::Error) diag(InvalidArg->getExprLoc(), ErrorInvalidArg, DiagnosticIDs::Error)
<< CallRange; << CallRange;
} }