================ @@ -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); + ---------------- bogner wrote:
This can't be tested util #135287 goes in, but it should warn. I added a commented out test and a `TODO` comment. 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