[clang] [HLSL] Diagnose dynamic indexing of struct arrays for resource access (PR #187132)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 2 17:55:49 PDT 2026
================
@@ -13699,6 +13699,9 @@ def err_hlsl_samplecmp_requires_float
def err_hlsl_gathercmp_invalid_component
: Error<"gatherCmp%select{Red|Green|Blue|Alpha}0 operations on the Vulkan target are not supported; only GatherCmp and GatherCmpRed are allowed">;
+def err_hlsl_resource_member_array_access_not_constant
+ : Error<"index for struct array inside cbuffer that contains resources must be a literal expression">;
----------------
hekota wrote:
I'll update the error message to say "constant integer expression".
https://github.com/llvm/llvm-project/pull/187132
More information about the cfe-commits
mailing list