Fixed crash in clang test suite introduced in b27ba72fdd

This commit is contained in:
PKEuS 2017-03-15 19:22:42 +01:00
parent 816106560a
commit c638180753
1 changed files with 4 additions and 2 deletions

View File

@ -3985,10 +3985,12 @@ const Function* Scope::findFunction(const Token *tok, bool requireConst) const
while (Token::Match(argtok, ".|::")) while (Token::Match(argtok, ".|::"))
argtok = argtok->astOperand2(); argtok = argtok->astOperand2();
if (argtok) {
const Variable * callarg = check->getVariableFromVarId(argtok->varId()); const Variable * callarg = check->getVariableFromVarId(argtok->varId());
checkVariableCallMatch(callarg, funcarg, same, fallback1, fallback2); checkVariableCallMatch(callarg, funcarg, same, fallback1, fallback2);
} }
} }
}
size_t hasToBe = func->isVariadic() ? (func->argCount() - 1) : args; size_t hasToBe = func->isVariadic() ? (func->argCount() - 1) : args;