Page MenuHomePhabricator

[Sema][Typo correction] Assertion failure in typo correction if chain of member function calls has multiple typos
Needs ReviewPublic

Authored by iid_iunknown on Sep 6 2017, 9:39 AM.

Details

Reviewers
ahatanak
rsmith
Summary

This is a patch proposal for PR34507.

Typo resolution can create new TypoExprs while transforming an expression. These TypoExprs are not transformed, they are present in the resulting expression and cause the DelayedTypos.empty() && "Uncorrected typos!" assertion failure in clang::Sema::~Sema(). If clang is built without assertions, these TypoExprs are not reported causing incomplete diagnostics.

The patch checks the transformed expression for new TypoExprs and, if any found, transforms the expression again until either all TypoExprs are handled or the result becomes invalid.

Diff Detail

Repository
rL LLVM