[clang] [llvm] [Clang-Repl] Introduce Error Recovery for Clang-Repl. (PR #223305)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 4 01:16:15 PDT 2026
================
@@ -54,6 +54,7 @@
namespace clang {
class ASTContext;
+class DeclStateReverter;
----------------
vgvassilev wrote:
Well, the visiting declarations is exactly what this patch is doing in a hand-written way. Consider the existing changes such as:
```diff
+#define PTU_SHAPES \
+ PTU_SHAPE(Class, CXXRecordDecl) \
+ PTU_SHAPE(Function, FunctionDecl) \
+ PTU_SHAPE(Var, VarDecl) \
+ PTU_SHAPE(Enum, EnumDecl) \
+ PTU_SHAPE(Template, RedeclarableTemplateDecl) \
+ PTU_SHAPE(Typedef, TypedefNameDecl)
```
They are exactly the dispatching the visitors are ding. Later the checks depending on the declaration kinds are also the same split that you get from a visitor. Help me see the benefits of the current approach wrt the one in the DeclUnmerger?
https://github.com/llvm/llvm-project/pull/223305
More information about the cfe-commits
mailing list