[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 16:03:43 PDT 2025
================
@@ -71,13 +71,17 @@ class MetadataBuilder {
SmallVector<Metadata *> GeneratedMetadata;
};
-// RangeInfo holds the information to correctly construct a ResourceRange
-// and retains this information to be used for displaying a better diagnostic
struct RangeInfo {
- const static uint32_t Unbounded = ~0u;
+ const static uint32_t Unbounded = static_cast<uint32_t>(-1);
----------------
bogner wrote:
Why change this? I certainly find `~0U` clearer, but if you want to avoid that for some reason it's better to use `std::numeric_limits<uint32_t>::max()` rather than casting negative one.
https://github.com/llvm/llvm-project/pull/140962
More information about the llvm-commits
mailing list