[clang] [clang-tools-extra] Remove delayed typo expressions (PR #143423)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 12 07:18:42 PDT 2025
================
@@ -974,7 +974,7 @@ class Foo final {})cpp";
HI.Name = "abc";
HI.Kind = index::SymbolKind::Variable;
HI.NamespaceScope = "";
- HI.Definition = "int abc = <recovery - expr>()";
----------------
kadircet wrote:
despite typoexprs fragile and complicated nature, i think they were providing most of their value by preserving more nodes in the AST, that can later on be used by source tools (especially for more error correction :)).
I don't think we need `TypoExpr`s for most of this, if possible, preserving these `TypoExpr` nodes through `RecoveryExpr`s would actually help a lot with preserving current behavior of tools but also shape of the AST for any other application.
I wouldn't block on this though, and wouldn't be surprised if this isn't trivial, we don't seem to be preserving typoexprs as recovery-exprs most of the time and I am not sure why.
https://github.com/llvm/llvm-project/pull/143423
More information about the cfe-commits
mailing list