[flang-commits] [libcxx] [flang] [compiler-rt] [lldb] [llvm] [clang] [libc] [clang] Fix assertion failure with deleted overloaded unary operators (PR #78316)

Mariya Podchishchaeva via flang-commits flang-commits at lists.llvm.org
Wed Jan 17 08:26:42 PST 2024


================
@@ -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.
----------------
Fznamznon wrote:

Ok, done.

https://github.com/llvm/llvm-project/pull/78316


More information about the flang-commits mailing list