================
@@ -14306,12 +14306,17 @@ Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, 
UnaryOperatorKind Opc,
     return ExprError();
 
   case OR_Deleted:
+    // CreateOverloadedUnaryOp fills first element of 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, so
+    // do a slice to ArgsArray to make sure apples are compared to apples.
----------------
cor3ntin wrote:

```suggestion
    // CreateOverloadedUnaryOp fills the first element of 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 the implicit object parameter, 
so
    // slice ArgsArray to make sure apples are compared to apples.
```

https://github.com/llvm/llvm-project/pull/78316
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to