[llvm] [CAS] Remove a redundant cast (NFC) (PR #168240)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 15 13:28:47 PST 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/168240
D.Offset.get() already returns uint64_t.
Identified with readability-redundant-casting.
>From bf2a634722e5313269ad75e21c1d89973a4e9ded Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 15 Nov 2025 09:56:40 -0800
Subject: [PATCH] [CAS] Remove a redundant cast (NFC)
D.Offset.get() already returns uint64_t.
Identified with readability-redundant-casting.
---
llvm/lib/CAS/OnDiskGraphDB.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/CAS/OnDiskGraphDB.cpp b/llvm/lib/CAS/OnDiskGraphDB.cpp
index 245b6fb832549..2d76ff11064e9 100644
--- a/llvm/lib/CAS/OnDiskGraphDB.cpp
+++ b/llvm/lib/CAS/OnDiskGraphDB.cpp
@@ -938,8 +938,7 @@ Error OnDiskGraphDB::validate(bool Deep, HashingFuncT Hasher) const {
// Check offset is a postive value, and large enough to hold the
// header for the data record.
if (D.Offset.get() <= 0 ||
- (uint64_t)D.Offset.get() + sizeof(DataRecordHandle::Header) >=
- DataPool.size())
+ D.Offset.get() + sizeof(DataRecordHandle::Header) >= DataPool.size())
return formatError("datapool record out of bound");
break;
case TrieRecord::StorageKind::Standalone:
More information about the llvm-commits
mailing list