[clang] [clang][modules] Remove preloaded SLocEntries from PCM files (PR #66962)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 3 13:53:00 PDT 2023


================
@@ -458,11 +458,14 @@ SourceManager::AllocateLoadedSLocEntries(unsigned NumSLocEntries,
       CurrentLoadedOffset - TotalSize < NextLocalOffset) {
     return std::make_pair(0, 0);
   }
-  LoadedSLocEntryTable.resize(LoadedSLocEntryTable.size() + NumSLocEntries);
-  SLocEntryLoaded.resize(LoadedSLocEntryTable.size());
+
+  unsigned NewTableSize = LoadedSLocEntryTable.size() + NumSLocEntries;
----------------
benlangmuir wrote:

You're storing `size_t` here, but the value is calculated as `unsigned`.  Not sure which is correct

https://github.com/llvm/llvm-project/pull/66962


More information about the cfe-commits mailing list