[clang] [SemaHLSL] Verify assignment of local resources (PR #176793)

Deric C. via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 19 10:34:33 PST 2026


================
@@ -13431,6 +13431,9 @@ def err_hlsl_incomplete_resource_array_in_function_param: Error<
   "incomplete resource array in a function parameter">;
 def err_hlsl_assign_to_global_resource: Error<
   "assignment to global resource variable %0 is not allowed">;
+def err_hlsl_assigning_local_resource_is_not_unique
+    : Error<"assignment to local resource %0 is not to same unique global "
+            "resource">;
----------------
Icohedron wrote:

```suggestion
    : Error<"assignment to local resource %0 is not to the same unique "
            "global resource">;
```

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


More information about the cfe-commits mailing list