diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
commit | c192b3dcffd5e672a2b2e1730e2440febb4fb192 (patch) | |
tree | ac719b5984165053bf83d71142e4d96b609b9784 /lib/Sema/SemaExprCXX.cpp | |
parent | 2e645aa5697838f16ec570eb07c2bee7e13d0e0b (diff) |
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 6c839f356fdc2..6608d7c1f061a 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()) |