UPSTREAM: [Sema][Typo Correction] Fix potential infite loop on ambiguity checks
Summary: This fixes a bug introduced in D62648, where Clang could infinite loop if it became stuck on a single TypoCorrection when it was supposed to be testing ambiguous corrections. Although not a common case, it could happen if there are multiple possible corrections with the same edit distance. The fix is simply to wipe the TypoExpr from the `TransformCache` so that the call to `TransformTypoExpr` doesn't use the `CachedEntry`. Reviewers: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67515 llvm-svn: 371859 Bug: 139945549 Bug: 145623332 (cherry picked from commit 6d186504) Change-Id: Ib9e5f8d9cbf330916df20136029f5601cd520f60 Signed-off-by:Nick Desaulniers <ndesaulniers@google.com>
Loading
Please sign in to comment