[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
Tue Apr 23 03:29:48 PDT 2024
cor3ntin 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 :)
https://github.com/llvm/llvm-project/pull/89494
More information about the cfe-commits
mailing list