================ @@ -14310,8 +14310,8 @@ Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_deleted_oper) << UnaryOperator::getOpcodeStr(Opc) << Input->getSourceRange()), - *this, OCD_AllCandidates, ArgsArray, UnaryOperator::getOpcodeStr(Opc), - OpLoc); + *this, OCD_AllCandidates, ArgsArray.slice(1), ---------------- Fznamznon wrote:
The problem `ArgArray.slice(1)` solves is that `CreateOverloadedUnaryOp` fills first element `ArgsArray` with the object whose method was called. Later in `NoteCandidates` size of `ArgsArray` is passed further and it eventually ends up compared to number of function candidate parameters which never includes implicit object parameter. https://github.com/llvm/llvm-project/pull/78316 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits