================
@@ -209,6 +202,13 @@ inline bool isValidParameterType(uint32_t V) {
   return false;
 }
 
+inline bool isValidRangeType(uint32_t V) {
+  static_assert(llvm::to_underlying(dxil::ResourceClass::Sampler) == 3,
+                "dxil::ResourceClass numeric values must match the Root "
+                "Signature values associated to each class.");
+  return V <= llvm::to_underlying(dxil::ResourceClass::Sampler);
----------------
bogner wrote:

Yeah, other than `static_assert` on each value individually there isn't much we 
can do here. I think the test coverage is sufficient here.

https://github.com/llvm/llvm-project/pull/154629
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to