================ @@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -Wno-error=hlsl-implicit-binding -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// expected-warning@+1 {{resource has implicit register binding}} +cbuffer cb0 { + int a; +} + +// No warning - this is an element of the $Globals buffer not it's own binding. +float b; + +// expected-warning@+1 {{resource has implicit register binding}} +RWBuffer<int> c; + +// No warning - explicit binding. +RWBuffer<float> d : register(u0); + ---------------- damyanp wrote:
How about: ``` RWBuffer<float> dd : register(space1); ``` https://github.com/llvm/llvm-project/pull/135909 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits