Nice! Your changes look good to me.
When looking at the code, it seems to me that NumArgsToCheck is redundant. Am I
missing something? I include a diff.
The tests runs fine with my change.
..................................................................................................................
Daniel Marjamäki
Senior Engineer
Evidente ES East AB
Warfvinges väg 34 SE-112 51 Stockholm Sweden
Mobile:
+46 (0)709 12 42 62
E-mail:
[email protected]
www.evidente.se
Index: lib/Sema/SemaOverload.cpp
===================================================================
--- lib/Sema/SemaOverload.cpp (revision 191370)
+++ lib/Sema/SemaOverload.cpp (arbetskopia)
@@ -11392,7 +11392,6 @@
Method->getType()->getAs<FunctionProtoType>();
unsigned NumArgsInProto = Proto->getNumArgs();
- unsigned NumArgsToCheck = std::max<unsigned>(Args.size(), NumArgsInProto);
DeclarationNameInfo OpLocInfo(
Context.DeclarationNames.getCXXOperatorName(OO_Call), LParenLoc);
@@ -11430,8 +11429,6 @@
// 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;
@@ -11446,7 +11443,7 @@
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];
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits