================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits