[llvm] 7262c59 - [CAS] Remove a redundant cast (NFC) (#168240)

via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 16 08:09:03 PST 2025


Author: Kazu Hirata
Date: 2025-11-16T08:08:59-08:00
New Revision: 7262c592c124a5bd8a5b534af5ed0390511116d9

URL: https://github.com/llvm/llvm-project/commit/7262c592c124a5bd8a5b534af5ed0390511116d9
DIFF: https://github.com/llvm/llvm-project/commit/7262c592c124a5bd8a5b534af5ed0390511116d9.diff

LOG: [CAS] Remove a redundant cast (NFC) (#168240)

D.Offset.get() already returns uint64_t.

Identified with readability-redundant-casting.

Added: 
    

Modified: 
    llvm/lib/CAS/OnDiskGraphDB.cpp

Removed: 
    


################################################################################
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