[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 30 01:14:03 PDT 2019

dgoldman created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

As Typo Resolution can create new TypoExprs while resolving typos,
it is necessary to recurse through the expression to search for more

This should fix the assertion failure in `clang::Sema::~Sema()`:

  `DelayedTypos.empty() && "Uncorrected typos!"`


- For expressions with multiple typos, we only give suggestions if we are able to resolve all typos in the expression
- This patch is similar to D37521 <https://reviews.llvm.org/D37521> except that it does not eagerly commit to a correction for the first typo in the expression. Instead, it will search for corrections which fix all of the typos in the expression.

  rC Clang



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62648.202132.patch
Type: text/x-patch
Size: 4932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190530/c7ec5622/attachment.bin>

More information about the cfe-commits mailing list