[clang-tools-extra] [clang-tidy] Compact the confusable identifier table (PR #202626)
David Zbarsky via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 5 18:36:18 PDT 2026
dzbarsky wrote:
> TBH, I haven't looked at this check before. Could you please describe how we store data before and now.
Previously, the generator emitted 6,355 fixed-size entries containing one source UTF32 value and 19 replacement UTF32 values. Every entry reserved enough space for the longest replacement, and skeleton() converted the replacement to UTF-8 on each lookup.
Now each unique replacement is stored once in a shared UTF-8 array. Each sorted entry contains the source code point and a 16-bit offset and length into that array. skeleton() appends those bytes directly. This reduces the table from 508,400 to 63,327 bytes.
https://github.com/llvm/llvm-project/pull/202626
More information about the cfe-commits
mailing list