[clang] [Clang][Parser] Don't always destroy template annotations at the end of a declaration (PR #89494)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 22 07:07:30 PDT 2024


cor3ntin wrote:

> > Are there actually any benefit from being that eager to delete template annotations?
> 
> Well, I don't have much context of that patch, but I think that makes sense in part e.g. When we have a function that involves many generic lambdas, where we would destroy template annotations at the end of each lambda, comparing to destroying these at the end of the function - indeed an improvement on memory, but I'm not sure how much we could gain from that in real scenarios.

Trying to rephrase:

If we remove MaybeDestroyTemplateIds(); in `ParseStatementOrDeclaration`, does it fix the bug, and does it actually impact performance?

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


More information about the cfe-commits mailing list