================ @@ -0,0 +1,76 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// This test validates the diagnostics that are emitted when a variable with a "resource" type +// is bound to a register using the register annotation + +// expected-error@+1 {{binding type 'b' only applies to constant buffer resources}} +RWBuffer<int> a : register(b2, space1); + +// expected-error@+1 {{binding type 't' only applies to srv resources}} +RWBuffer<int> b : register(t2, space1); + +// NOT YET IMPLEMENTED : {{invalid register name prefix 'u' for register type 'Texture1D' (expected 't')}} ---------------- damyanp wrote:
All of these NOT YET IMPLEMENTED we should be able to implement and test now that we can spell resource_class. I'm not convinced that the errors listed here match the current design though? Would this one for example now be "binding type 'u' only applies to uav resources"? https://github.com/llvm/llvm-project/pull/97103 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits