[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 25 00:40:56 PDT 2025


ChuanqiXu9 wrote:

> If the module file index is 0, we use delta encoding (see [this code path](https://github.com/llvm/llvm-project/blob/01b288fe6a1e627954329198ed5641f2bf55ee8d/clang/include/clang/Serialization/SourceLocationEncoding.h#L165-L168)).
> However, the 1) case can produce a 33-bit value, which doesn’t fit in the lower 32 bits.

In this case, I am fine to drop the optimizations. I don't like these small optimization which is hard to maintain and not significant for users.

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


More information about the cfe-commits mailing list