Author: Kazu Hirata Date: 2025-05-13T07:12:57-07:00 New Revision: 69ce68109a3df221b507eb2308d5984ee7a71e22
URL: https://github.com/llvm/llvm-project/commit/69ce68109a3df221b507eb2308d5984ee7a71e22 DIFF: https://github.com/llvm/llvm-project/commit/69ce68109a3df221b507eb2308d5984ee7a71e22.diff LOG: [Serialization] Use StringRef::substr (NFC) (#139678) StringRef::substr is shorter here because we can rely on its default second parameter. Added: Modified: clang/lib/Serialization/ASTWriter.cpp Removed: ################################################################################ diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index c4c0603839c62..7de510c85bfed 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -1237,7 +1237,7 @@ ASTWriter::createSignature() const { Hasher.update( AllBytes.slice(UnhashedControlBlockRange.second, ASTBlockRange.first)); // 3. After the AST block. - Hasher.update(AllBytes.slice(ASTBlockRange.second, StringRef::npos)); + Hasher.update(AllBytes.substr(ASTBlockRange.second)); ASTFileSignature Signature = ASTFileSignature::create(Hasher.result()); return std::make_pair(ASTBlockHash, Signature); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits