[clang] [llvm] [Clang-Repl] Introduce Error Recovery for Clang-Repl. (PR #223305)

via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 3 22:32:02 PDT 2026


================
@@ -54,6 +54,7 @@
 namespace clang {
 
 class ASTContext;
+class DeclStateReverter;
----------------
SahilPatidar wrote:

I looked at ASTDeclUnmerger. There is some overlap, but the mechanism is different.

The current workflow needs ::detach/unlink functionality. `ASTDeclUnmerger` works by visiting declarations, while the current workflow uses `DeclStateUnlinkPolicy` as a per-PTU decision-maker and asks DeclStateReverter to do the actual work.

So for me, changing `ASTDeclUnmerger` to fit this would be more like replacing its current behavior or renaming DeclStateReverter to ASTDeclUnmerger.

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


More information about the cfe-commits mailing list