We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 005e4b7 commit eacde9aCopy full SHA for eacde9a
clang/lib/Sema/SemaHLSL.cpp
@@ -3285,7 +3285,7 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) {
3285
}
3286
3287
3288
- if (!HasBinding && VD->getType()->isHLSLResourceRecord())
+ if (!HasBinding && isResourceRecordTypeOrArrayOf(VD))
3289
SemaRef.Diag(VD->getLocation(), diag::warn_hlsl_implicit_binding);
3290
3291
clang/test/SemaHLSL/resource_binding_implicit.hlsl
@@ -32,3 +32,9 @@ struct CustomSRV {
32
};
33
// expected-warning@+1 {{resource has implicit register binding}}
34
CustomSRV g;
35
+
36
+// expected-warning@+1 {{resource has implicit register binding}}
37
+RWBuffer<float> h[10];
38
39
+// No warning - explicit binding.
40
+RWBuffer<float> hh[100] : register(u4);
0 commit comments