Author: Kazu Hirata Date: 2025-07-06T19:05:52-07:00 New Revision: 15653108b11ebd29004f2fba44a5c757b8a7efa8
URL: https://github.com/llvm/llvm-project/commit/15653108b11ebd29004f2fba44a5c757b8a7efa8 DIFF: https://github.com/llvm/llvm-project/commit/15653108b11ebd29004f2fba44a5c757b8a7efa8.diff LOG: [Serialization] Remove an unnecessary cast (NFC) (#147204) IndexFromEnd is already of int. Added: Modified: clang/lib/Serialization/ASTReader.cpp Removed: ################################################################################ diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 6e03de87e587d..cc2d2ea86ccb7 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -9682,7 +9682,7 @@ ModuleFile *ASTReader::getLocalModuleFile(ModuleFile &M, unsigned ID) const { // It's a prefix (preamble, PCH, ...). Look it up by index. int IndexFromEnd = static_cast<int>(ID >> 1); assert(IndexFromEnd && "got reference to unknown module file"); - return getModuleManager().pch_modules().end()[-static_cast<int>(IndexFromEnd)]; + return getModuleManager().pch_modules().end()[-IndexFromEnd]; } } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits