================
@@ -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!");
----------------
llvm-beanz wrote:

I'm trying to think through how this occurs. You're somehow ending up with an 
expression that is an array parameter type, which is an l-value?

I assume that's only valid in the case of the out argument expression, maybe 
the better change is to move the assert under the next if block where we handle 
out argument expressions?

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