Skip to content

Commit 69ce681

Browse files
[Serialization] Use StringRef::substr (NFC) (#139678)
StringRef::substr is shorter here because we can rely on its default second parameter.
1 parent d934d17 commit 69ce681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ ASTWriter::createSignature() const {
12371237
Hasher.update(
12381238
AllBytes.slice(UnhashedControlBlockRange.second, ASTBlockRange.first));
12391239
// 3. After the AST block.
1240-
Hasher.update(AllBytes.slice(ASTBlockRange.second, StringRef::npos));
1240+
Hasher.update(AllBytes.substr(ASTBlockRange.second));
12411241
ASTFileSignature Signature = ASTFileSignature::create(Hasher.result());
12421242

12431243
return std::make_pair(ASTBlockHash, Signature);

0 commit comments

Comments
 (0)