[clang] [clang-repl] Extend the C support. (PR #89804)

Stefan Gränitz via cfe-commits cfe-commits at lists.llvm.org
Tue May 14 05:57:06 PDT 2024


================
@@ -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())
----------------
weliveindetail wrote:

Alright, so in this case `IdResolver` has no entry for `ND`? Can we assert that? Might also be a good a pointer for the uninformed reader.

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


More information about the cfe-commits mailing list