vsapsai added a comment.
Some debugging details that can be useful but too specific for the commit
message. When we have infinite loop, the steps are:
1. Detect typos `structVar1`, `structVar2`
2. Correct typos `structVar1`, `structVar2`
1. Replace `structVar1` with `structVar`. Add correspond
vsapsai updated this revision to Diff 148841.
vsapsai added a comment.
- Fix only infinite loop and don't touch the assertion failure.
New commit message should be:
[Sema] Fix infinite typo correction loop.
NumTypos guard value ~0U doesn't prevent from creating new delayed typos. When
you creat
vsapsai planned changes to this revision.
vsapsai added a comment.
After looking into this more, I think there are 2 different bugs: one with
infinite loop and another with `DelayedTypos.empty() && "Uncorrected typos!"`
assertion. And disabling typo correction happened to fix both of them.
Infi
rsmith added a comment.
Rather than disabling typo correction in `TransformTypos`, it would be
preferable to attempt to immediately correct them. (That should allow the
`variableX.getX()` case to still work.)
https://reviews.llvm.org/D47341
___
cf
arphaman added inline comments.
Comment at: clang/test/SemaCXX/typo-correction-delayed.cpp:146
+ // expected-error@+1 {{use of undeclared identifier 'variableX'}}
int x = variableX.getX();
}
Loosing typo correction for 'getX' is fine, however, I think we sti
vsapsai created this revision.
vsapsai added reviewers: arphaman, majnemer.
NumTypos guard value ~0U doesn't prevent from creating new delayed
typos. When you create new delayed typos during typo correction, value
~0U wraps around to 0. This state is inconsistent and depending on total
number of t