[clang] [HLSL] Add a warning for implicit bindings (PR #135909)

Finn Plummer via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 16 11:22:43 PDT 2025


================
@@ -3278,6 +3284,9 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) {
           << static_cast<int>(RT);
     }
   }
+
+  if (!HasBinding && VD->getType()->isHLSLResourceRecord())
----------------
inbelic wrote:

I do also see the function `isResourceRecordTypeOrArrayOf` defined in `CGHLSLRuntime`. So just a quick check that we would never expect an array of them here

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


More information about the cfe-commits mailing list