[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 30 08:20:59 PDT 2025
erichkeane wrote:
> > I did a light pass of the 1st 1/4 of this or so. The smuggling back and forth to raw-encoding seems strange? WHy are we doing that here?
>
> In this patch, to keep AST node size as small as possible, we're using 40 bits of `StmtBits` to store the SourceLocation, we need this back-and-forth conversion.
>
> For the `DeclarationName`, you're right — we can just store the SourceLocation directly and avoid the raw-encoding round-trip.
Sorry for being dumb... how are we getting away with only storing 40 bits? Does that not just artificially limit our source-location size for statements? And, frankly, then our entire space? I guess 8 2x-increases in source-location size are nice, but I was sort of hoping the switch to 64 bits meant we never had to discuss this again for the rest of my life:D
https://github.com/llvm/llvm-project/pull/146314
More information about the cfe-commits
mailing list