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
This commit is contained in:
Emilio Cobos Álvarez
2018-03-09 19:37:58 +01:00
parent 7168a941f9
commit 5da4f2106a

View File

@@ -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
// signal it.
if (InvalidArg) {
diag(CallRange.getBegin(), ErrorInvalidArg, DiagnosticIDs::Error)
diag(InvalidArg->getExprLoc(), ErrorInvalidArg, DiagnosticIDs::Error)
<< CallRange;
}