rsmith added a comment. In D64799#1592263 <https://reviews.llvm.org/D64799#1592263>, @rnk wrote:
> In D64799#1591732 <https://reviews.llvm.org/D64799#1591732>, @ilya-biryukov > wrote: > > > @rsmith, I'll look into emitting the typos when we pop expression > > evaluation context, but do we expect this to cover **all** cases where > > `TypoExpr`s are produced? > > (conservatively assuming that the answer is "no") should we land this > > patch and also emit at the end of TU in addition to expression evaluation > > context? > > > I was going to pose the question this way: suppose clang already diagnosed > typos when leaving an expr evaluation context, when appropriate. Would it > still make sense to relax this assertion to diagnose any remaining ones at > end of TU? Are we confident that we can catch all the typos, always? I'm not > confident that everything will be handled, so I think we should take this > change as is. There may still be uncorrected typos left behind in the outermost `ExprEvalContext` (created by the `Sema` constructor). In principle we should be able to get rid of that and parse all expressions in an evaluation context created for that expression (and anywhere we can't do that is a bug because we'll be parsing an expression without specifying whether it's potentially-evaluated, etc), but in practice it looks like there are still at least a few places where we parse expressions with no expression evaluation context, so cleaning up the typos in `ExprEvalContext[0]` from `ActOnEndOfTranslationUnitFragment` seems reasonable to me too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64799/new/ https://reviews.llvm.org/D64799 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits