v.g.vassilev added inline comments.
================ Comment at: clang/lib/Interpreter/IncrementalParser.cpp:180 DiagnosticsEngine &Diags = getCI()->getDiagnostics(); if (Diags.hasErrorOccurred()) { TranslationUnitDecl *MostRecentTU = C.getTranslationUnitDecl(); ---------------- junaire wrote: > v.g.vassilev wrote: > > We should call Restore here. > Though there are many logic duplicates with `Restore`, I'm not sure if we can > refactor it. We have done more here than `Restore`, and `Restore` need to > pass a PTU, but we only have `TranslationDecl` here. I think we can/should be able to construct the `PartialTranslationUnit` with only a `TranslationUnitDecl` having `TheModule` as `nullptr`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126682/new/ https://reviews.llvm.org/D126682 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits