================ @@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit &PTU) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { + if (!isa<NamedDecl>(D)) + continue; + // Check if we need to clean up the IdResolver chain. + NamedDecl *ND = cast<NamedDecl>(D); + if (ND->getDeclName().getFETokenInfo()) ---------------- vgvassilev wrote:
To clarify, you want an assert for the case where we try to remove the `ND` from the `IdResolved` but it was never registered? If so, `RemoveDecl` asserts (I was hurt couple of times there ;)) https://github.com/llvm/llvm-project/pull/89804 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits