================ @@ -10524,6 +10524,11 @@ Sema::PerformCopyInitialization(const InitializedEntity &Entity, Expr *InitE = Init.get(); assert(InitE && "No initialization expression?"); + if (LangOpts.HLSL) + if (auto AdjTy = dyn_cast<DecayedType>(Entity.getType())) + if (AdjTy->getOriginalType()->isConstantArrayType()) + InitE = HLSLArrayTemporaryExpr::Create(getASTContext(), InitE); ---------------- llvm-beanz wrote:
Ooo. I like this idea a lot. Let me go give that a try. I was trying to avoid completely breaking array decay completely because at some point we’re going to align the language more with C/C++. 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