Commit 2555ffef authored by David Goldman's avatar David Goldman Committed by Nick Desaulniers
Browse files

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: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 6e765c10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment