[clang] [HLSL] Allow arrays to be returned by value in HLSL (PR #127896)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 24 08:01:59 PST 2025


================
@@ -20760,7 +20761,8 @@ ExprResult RebuildUnknownAnyExpr::VisitCallExpr(CallExpr *E) {
 
 ExprResult RebuildUnknownAnyExpr::VisitObjCMessageExpr(ObjCMessageExpr *E) {
   // Verify that this is a legal result type of a call.
-  if (DestType->isArrayType() || DestType->isFunctionType()) {
+  if ((DestType->isArrayType() && !S.Context.isReturnableArrayType()) ||
----------------
llvm-beanz wrote:

This code shouldn't be updated. We're definitely not building ObjCMessage expressions in HLSL!

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


More information about the cfe-commits mailing list