[clang] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

Damyan Pepper via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 12:00:32 PDT 2024


================
@@ -0,0 +1,73 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify
+
+
+// expected-error at +1  {{invalid register name prefix 'b' for register resource type 'RWBuffer' (expected 'u')}}
+RWBuffer<int> a : register(b2, space1);
----------------
damyanp wrote:

> float b : register(u0, space1);

This would also be invalid even if the register type were correct because you can't have spaces on global constants.

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


More information about the llvm-commits mailing list