Sema: Cleanup redundant variable NumArgsToCheck
Patch by Daniel Marjamäki! llvm-svn: 192030
This commit is contained in:
parent
b96ebac02b
commit
3c529ca930
|
@ -11396,7 +11396,6 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj,
|
|||
Method->getType()->getAs<FunctionProtoType>();
|
||||
|
||||
unsigned NumArgsInProto = Proto->getNumArgs();
|
||||
unsigned NumArgsToCheck = std::max<unsigned>(Args.size(), NumArgsInProto);
|
||||
|
||||
DeclarationNameInfo OpLocInfo(
|
||||
Context.DeclarationNames.getCXXOperatorName(OO_Call), LParenLoc);
|
||||
|
@ -11434,8 +11433,6 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj,
|
|||
// 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;
|
||||
|
||||
|
@ -11450,7 +11447,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj,
|
|||
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];
|
||||
|
|
Loading…
Reference in New Issue