[clang] [Clang] Cache AST context lookup for declarations (NFC) (PR #223047)
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 26 11:34:49 PDT 2026
nico wrote:
> It grew to what it is now after the [comment here](https://github.com/llvm/llvm-project/pull/223047#discussion_r4065388840):
>
> > We might as well just past the ASTContext into the DeclContext constructor; should be simple to implement, and makes things slightly faster if we can skip doing a null check.
Did it make things slightly faster in practice? +13-1 instead of +169-112 seems much nicer for a perf tweak to me 😅
(I'm happy if this PR here lands instead of mine.)
https://github.com/llvm/llvm-project/pull/223047
More information about the cfe-commits
mailing list