This revision was automatically updated to reflect the committed changes. Closed by commit rG4f8d9722b499: [clang] Fix an uint32_t overflow in large preamble. (authored by hokein).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79397/new/ https://reviews.llvm.org/D79397 Files: clang/include/clang/Serialization/ASTReader.h clang/include/clang/Serialization/ASTRecordReader.h clang/lib/Serialization/ASTReaderDecl.cpp Index: clang/lib/Serialization/ASTReaderDecl.cpp =================================================================== --- clang/lib/Serialization/ASTReaderDecl.cpp +++ clang/lib/Serialization/ASTReaderDecl.cpp @@ -2879,7 +2879,7 @@ return RecordLocation(I->second, GlobalOffset - I->second->GlobalBitOffset); } -uint64_t ASTReader::getGlobalBitOffset(ModuleFile &M, uint32_t LocalOffset) { +uint64_t ASTReader::getGlobalBitOffset(ModuleFile &M, uint64_t LocalOffset) { return LocalOffset + M.GlobalBitOffset; } Index: clang/include/clang/Serialization/ASTRecordReader.h =================================================================== --- clang/include/clang/Serialization/ASTRecordReader.h +++ clang/include/clang/Serialization/ASTRecordReader.h @@ -119,7 +119,7 @@ //readExceptionSpecInfo(SmallVectorImpl<QualType> &ExceptionStorage); /// Get the global offset corresponding to a local offset. - uint64_t getGlobalBitOffset(uint32_t LocalOffset) { + uint64_t getGlobalBitOffset(uint64_t LocalOffset) { return Reader->getGlobalBitOffset(*F, LocalOffset); } Index: clang/include/clang/Serialization/ASTReader.h =================================================================== --- clang/include/clang/Serialization/ASTReader.h +++ clang/include/clang/Serialization/ASTReader.h @@ -1367,7 +1367,7 @@ unsigned PreviousGeneration = 0); RecordLocation getLocalBitOffset(uint64_t GlobalOffset); - uint64_t getGlobalBitOffset(ModuleFile &M, uint32_t LocalOffset); + uint64_t getGlobalBitOffset(ModuleFile &M, uint64_t LocalOffset); /// Returns the first preprocessed entity ID that begins or ends after /// \arg Loc.
Index: clang/lib/Serialization/ASTReaderDecl.cpp =================================================================== --- clang/lib/Serialization/ASTReaderDecl.cpp +++ clang/lib/Serialization/ASTReaderDecl.cpp @@ -2879,7 +2879,7 @@ return RecordLocation(I->second, GlobalOffset - I->second->GlobalBitOffset); } -uint64_t ASTReader::getGlobalBitOffset(ModuleFile &M, uint32_t LocalOffset) { +uint64_t ASTReader::getGlobalBitOffset(ModuleFile &M, uint64_t LocalOffset) { return LocalOffset + M.GlobalBitOffset; } Index: clang/include/clang/Serialization/ASTRecordReader.h =================================================================== --- clang/include/clang/Serialization/ASTRecordReader.h +++ clang/include/clang/Serialization/ASTRecordReader.h @@ -119,7 +119,7 @@ //readExceptionSpecInfo(SmallVectorImpl<QualType> &ExceptionStorage); /// Get the global offset corresponding to a local offset. - uint64_t getGlobalBitOffset(uint32_t LocalOffset) { + uint64_t getGlobalBitOffset(uint64_t LocalOffset) { return Reader->getGlobalBitOffset(*F, LocalOffset); } Index: clang/include/clang/Serialization/ASTReader.h =================================================================== --- clang/include/clang/Serialization/ASTReader.h +++ clang/include/clang/Serialization/ASTReader.h @@ -1367,7 +1367,7 @@ unsigned PreviousGeneration = 0); RecordLocation getLocalBitOffset(uint64_t GlobalOffset); - uint64_t getGlobalBitOffset(ModuleFile &M, uint32_t LocalOffset); + uint64_t getGlobalBitOffset(ModuleFile &M, uint64_t LocalOffset); /// Returns the first preprocessed entity ID that begins or ends after /// \arg Loc.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits