From e7bcad327814a78ecb8d5f5545d2e3df84c67a5c Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 5 Jul 2015 14:23:59 +0000 Subject: Vendor import of clang trunk r241361: https://llvm.org/svn/llvm-project/cfe/trunk@241361 --- lib/Sema/SemaExprCXX.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Sema/SemaExprCXX.cpp') diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 6c839f3..6608d7c 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -6506,6 +6506,11 @@ public: // with the same edit length that pass all the checks and filters. // TODO: Properly handle various permutations of possible corrections when // there is more than one potentially ambiguous typo correction. + // Also, disable typo correction while attempting the transform when + // handling potentially ambiguous typo corrections as any new TypoExprs will + // have been introduced by the application of one of the correction + // candidates and add little to no value if corrected. + SemaRef.DisableTypoCorrection = true; while (!AmbiguousTypoExprs.empty()) { auto TE = AmbiguousTypoExprs.back(); auto Cached = TransformCache[TE]; @@ -6522,6 +6527,7 @@ public: State.Consumer->restoreSavedPosition(); TransformCache[TE] = Cached; } + SemaRef.DisableTypoCorrection = false; // Ensure that all of the TypoExprs within the current Expr have been found. if (!Res.isUsable()) -- cgit v1.1