================
@@ -4655,6 +4655,13 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, 
const Expr *E,
     return emitWritebackArg(*this, args, CRE);
   }
 
+  // If an argument is an array paramter expression being passed through. Emit
+  // the argument to a temporary and pass the temporary as the call arg.
+  if (auto AT = dyn_cast<ArrayParameterType>(type)) {
+    args.add(EmitAnyExprToTemp(E), type);
----------------
efriedma-quic wrote:

I don't think this code should be necessary?  E shouldn't be an lvalue or a 
record type, so we should just fall through to the same code at the end of the 
function, I think?

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

Reply via email to