[clang] [Clang][Parser] Don't always destroy template annotations at the end of a declaration (PR #89494)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 04:10:00 PDT 2024
zyn0217 wrote:
> I'm not strongly opposed to merge that, however, i did confirm locally that removing the call to `MaybeDestroyTemplateIds` in `ParseStatementOrDeclaration` fixes the bug.
>
> We currently destroy annotations
>
> * At the end of a top level decl (and extern decl)
> * At the end of a member specification
> * At the end of statements
>
> Removing the last case would only impact long functions using lots of templates. so the added complexity feels a bit brittle and unnecessary to to me but I'll let Aron have the last word :)
@AaronBallman Would you mind giving a final stamp on this? Or if you also feel the complexity is unnecessary (based on Corentin's opinion), I'd love to do it the other way around. :)
https://github.com/llvm/llvm-project/pull/89494
More information about the cfe-commits
mailing list