[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 24 23:46:25 PDT 2025
hokein wrote:
> Sorry. I failed to understand the problem. In what case, may the encoder produce up to 33 bits?
The newly-added testcase shows the issue -- the encoded value for the delta is `1<<32`, relevant code https://github.com/llvm/llvm-project/blob/c3c923c8d62c1e85fe396a499c921c8a475bb86d/clang/include/clang/Serialization/SourceLocationEncoding.h#L123-L125.
And when decoding, we only read the lower 32 bits, which misses the 33rd bit.
https://github.com/llvm/llvm-project/pull/145529
More information about the cfe-commits
mailing list