================
@@ -15770,11 +15788,17 @@ Decl *Sema::ActOnParamDeclarator(Scope *S, Declarator 
&D,
   }
 
   // Incomplete resource arrays are not allowed as function parameters in HLSL
-  if (getLangOpts().HLSL && parmDeclType->isIncompleteArrayType() &&
-      parmDeclType->isHLSLResourceRecordArray()) {
-    Diag(D.getIdentifierLoc(),
-         diag::err_hlsl_incomplete_resource_array_in_function_param);
-    D.setInvalidType(true);
+  if (getLangOpts().HLSL && parmDeclType->isIncompleteArrayType()) {
+    QualType EltTy = Context.getBaseElementType(parmDeclType);
+    // `isCompleteType` forces completion of the element type so the resource
----------------
hekota wrote:

```suggestion
    // `isCompleteType` forces completion of the element type without reporting
    // an error (that is handled elsewhere) so the resource
```

https://github.com/llvm/llvm-project/pull/208111
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to