Method->getType()->getAs<FunctionProtoType>();
unsigned NumArgsInProto = Proto->getNumArgs();
- unsigned NumArgsToCheck = std::max<unsigned>(Args.size(), NumArgsInProto);
DeclarationNameInfo OpLocInfo(
Context.DeclarationNames.getCXXOperatorName(OO_Call), LParenLoc);
// slots in the call for them.
if (Args.size() < NumArgsInProto)
TheCall->setNumArgs(Context, NumArgsInProto + 1);
- else if (Args.size() > NumArgsInProto)
- NumArgsToCheck = NumArgsInProto;
bool IsError = false;
TheCall->setArg(0, Object.take());
// Check the argument types.
- for (unsigned i = 0; i != NumArgsToCheck; i++) {
+ for (unsigned i = 0; i != NumArgsInProto; i++) {
Expr *Arg;
if (i < Args.size()) {
Arg = Args[i];