erichkeane wrote: > I'm having second thoughts about leveraging recovery expressions as a > side-band mechanism to de-duplicate diagnostics, because not modeling things > properly in AST might backfire in the future. But I don't have anything > better on my mind, so I don't want to block the progress of this PR.
This is a case where we previously would use `ExprError`. Typically, we don't include 'incorrect' expressions in the AST, as it results in us trying to instantiate them (like we see here). The duplicate diagnostics is a side-effect of doing that wrong. The `RecoveryExpr` is, IMO, a half decent way to actually model things properly in the AST despite them having an error. https://github.com/llvm/llvm-project/pull/89142 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits