[PATCH] D130847: [clang] SourceManager: fix isOffsetInFileID for the case of a fake SLocEntry

Ivan Murashko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 2 04:48:51 PDT 2022


ivanmurashko added inline comments.


================
Comment at: clang/lib/Basic/SourceManager.cpp:901
     const SrcMgr::SLocEntry &E = getLoadedSLocEntry(MiddleIndex);
     if (E.getOffset() == 0)
       return FileID(); // invalid entry.
----------------
FYI: the same check is used for the rest of the search procedure


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130847/new/

https://reviews.llvm.org/D130847



More information about the cfe-commits mailing list