[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 19 16:03:43 PDT 2025


================
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s -verify
+
+#define Overlap0 "CBV(b42), CBV(b42)"
+
+[RootSignature(Overlap0)] // expected-error {{resource ranges b[42;42] and b[42;42] overlap within space = 0 and visibility = All}}
----------------
bogner wrote:

I suspect this test will be slightly more readable if we skip the defines. You can use `expected-error at +1` to say the error is expected on the next line so that the attribute and error message don't need to be on the same line.

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


More information about the llvm-commits mailing list