================
@@ -4690,8 +4690,9 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, 
const Expr *E,
     return emitWritebackArg(*this, args, CRE);
   }
 
-  assert(type->isReferenceType() == E->isGLValue() &&
-         "reference binding to unmaterialized r-value!");
+  assert(type->isArrayParameterType() ||
+         (type->isReferenceType() == E->isGLValue()) &&
+             "reference binding to unmaterialized r-value!");
----------------
efriedma-quic wrote:

Can you perform the equivalent check for array parameters here, whatever that 
looks like?  Given a function signature, it should be possible to compute 
whether the argument expression is supposed to be an lvalue or rvalue.

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

Reply via email to