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

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 29 04:22:22 PDT 2023


sam-mccall wrote:

Ripping out this feature sounds great, as does fixing the non-translation of builtin buffer locations.

My only concern is that this will make isBeforeInTranslationUnit more expensive. A loc being in one of these special "<buffers>" is the rare case, and the code recognizing them doesn't look fast (which didn't previously matter, as we only reached it rarely).

That said, isBeforeInTranslationUnit is slow already, and I don't think it's hot in clang, moreso in tools like clang-tidy whose performance is less-critical. So let's make it right, and then optimize it again if problems arise.

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


More information about the cfe-commits mailing list