[clang] [clang][modules] Move `SLocEntry` search into `ASTReader` (PR #66966)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 09:55:40 PDT 2023


================
@@ -864,74 +864,7 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const {
 /// This function knows that the SourceLocation is in a loaded buffer, not a
 /// local one.
 FileID SourceManager::getFileIDLoaded(SourceLocation::UIntTy SLocOffset) const {
-  if (SLocOffset < CurrentLoadedOffset) {
-    assert(0 && "Invalid SLocOffset or bad function choice");
----------------
benlangmuir wrote:

Where would this case end up failing in the new implementation?

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


More information about the cfe-commits mailing list