zyn0217 wrote: > One question I have is whether it would make sense to modify > DestroyTemplateIdAnnotationsRAIIObj to not call MaybeDestroyTemplateIds() in > the first place
I’d love to try if it were feasible, but please note that the annotation was deleted by a direct call to MaybeDestroyTemplateIds, not using the RAII object. I tried to teach DestroyTemplateIdAnnotationsRAIIObj to have opt-in destruction, but I soon realized that would introduce more complexity/changes to callers of ParseStatementOrDeclaration, because that function isn’t aware of the context if it should clean up annotations immediately. https://github.com/llvm/llvm-project/pull/89494 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits