[PATCH] D34430: [Clang][TypoCorrection] Clang hangs in typo correction
Oleg Ranevskyy via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 20 17:05:31 PDT 2017
iid_iunknown updated this revision to Diff 103297.
iid_iunknown added a comment.
Fixed white spaces.
Repository:
rL LLVM
https://reviews.llvm.org/D34430
Files:
lib/Sema/SemaExprCXX.cpp
Index: lib/Sema/SemaExprCXX.cpp
===================================================================
--- lib/Sema/SemaExprCXX.cpp
+++ lib/Sema/SemaExprCXX.cpp
@@ -7246,10 +7246,13 @@
/// TransformCache). Returns true if there is still any untried combinations
/// of corrections.
bool CheckAndAdvanceTypoExprCorrectionStreams() {
+ bool CheckLimitExceeded =
+ SemaRef.TyposCorrected >=
+ SemaRef.getDiagnostics().getDiagnosticOptions().SpellCheckingLimit;
for (auto TE : TypoExprs) {
auto &State = SemaRef.getTypoExprState(TE);
TransformCache.erase(TE);
- if (!State.Consumer->finished())
+ if (!CheckLimitExceeded && !State.Consumer->finished())
return true;
State.Consumer->resetCorrectionStream();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34430.103297.patch
Type: text/x-patch
Size: 792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170621/cf589e7c/attachment.bin>
More information about the cfe-commits
mailing list