================ @@ -5591,7 +5592,11 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( IsRValRef1); Args2.push_back(Obj2Ty); } - size_t NumComparedArguments = NumCallArguments1 + ShouldConvert1; + size_t NumComparedArguments = NumCallArguments1; + // Either added an argument above or the prototype includes an explicit + // object argument we need to count + if (Method1) + ++NumComparedArguments; ---------------- MitalAshok wrote:
@mizvekov It would look something like this: b19a252f50e3b6d5dd50b0e51ec2865bb83fd5c9 But I think it's more error-prone because instead of `+1` in one place, it's sometimes a `+1` in all the places `ExplicitCallArguments` is set https://github.com/llvm/llvm-project/pull/92263 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits